Skip to main content
POST
/
api
/
metrics
/
developer
/
teams
/
create
curl --request POST \
  --url https://api.codeant.ai/api/metrics/developer/teams/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "platform": "github",
  "org": "my-org",
  "name": "Backend Squad",
  "description": "Backend API developers",
  "members": [
    {
      "user_login": "jane@example.com",
      "user_name": "Jane Doe",
      "role": "lead"
    },
    {
      "user_login": "john@example.com",
      "user_name": "John Smith",
      "role": "member"
    }
  ],
  "team_leads": [
    "jane@example.com"
  ]
}
'
{
  "status": "success",
  "message": "Team created successfully",
  "team": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Backend Team",
    "description": "Responsible for API services",
    "color": "#1570EF",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "team_leads": [
      "<string>"
    ],
    "members": [
      {
        "user_login": "jane@example.com",
        "user_name": "Jane Doe",
        "joined_at": "2023-11-07T05:31:56Z",
        "role": "member"
      }
    ],
    "tags": [
      "<string>"
    ],
    "parent_team_id": "<string>",
    "repositories": [
      "my-org/backend-api"
    ],
    "is_active": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.codeant.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Access token for the git provider (GitHub PAT, GitLab PAT, Bitbucket App Password, Azure DevOps PAT). Pass via Authorization: Bearer <token> header.

Body

application/json
platform
enum<string>
required

Version control platform

Available options:
github,
gitlab,
bitbucket,
azure_devops,
azuredevops
Example:

"github"

org
string
required

Organization, workspace, or group name on the platform

Example:

"my-org"

name
string
required

Team name (min 2 characters)

Minimum string length: 2
Example:

"Backend Team"

github_base_url
string
default:https://github.com

Base URL for GitHub (use for GitHub Enterprise Server)

Example:

"https://github.com"

gitlab_base_url
string
default:https://gitlab.com

Base URL for GitLab (use for self-hosted GitLab instances)

Example:

"https://gitlab.com"

azure_devops_base_url
string
default:https://dev.azure.com

Base URL for Azure DevOps (use for Azure DevOps Server)

Example:

"https://dev.azure.com"

bitbucket_base_url
string
default:https://api.bitbucket.org/2.0

Base URL for Bitbucket (use for Bitbucket Data Center/Server)

Example:

"https://api.bitbucket.org/2.0"

description
string

Team description

Example:

"Responsible for API services"

color
string

Hex color code

Example:

"#1570EF"

team_leads
string[]
Example:
["lead@example.com"]
repositories
string[]
Example:
["my-org/backend-api"]
members
object[]

Initial team members to add at creation. You can create a team with members, repositories, or both.

Example:
[
{
"user_login": "jane@example.com",
"user_name": "Jane Doe",
"role": "lead"
},
{
"user_login": "john@example.com",
"user_name": "John Smith",
"role": "member"
}
]
tags
string[]

Tags for categorizing the team

Example:
["backend", "api"]
parent_team_id
string<uuid>

Parent team ID for creating nested/sub-teams

Example:

""

created_by
string
default:system

Identifier of who created the team

Example:

"admin@example.com"

Response

Team created successfully

status
string
Example:

"success"

message
string
Example:

"Team created successfully"

team
object

A developer team with members, metadata, and repository assignments