v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Teams

Create team

Create a team. To learn more, read Creating a team.

Expanding the teams response

LaunchDarkly supports four fields for expanding the "Create team" response. By default, these fields are not included in the response.

To expand the response, append the expand query parameter and add a comma-separated list with any of the following fields:

  • members includes the total count of members that belong to the team.
  • roles includes a paginated list of the custom roles that you have assigned to the team.
  • projects includes a paginated list of the projects that the team has any write access to.
  • maintainers includes a paginated list of the maintainers that you have assigned to the team.

For example, expand=members,roles includes the members and roles fields in the response.

post/api/v2/teams

Query parameters

expandstring string

A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.

A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.

Request body

customRoleKeysstring[]

List of custom role keys the team will access

descriptionstring

A description of the team

keystring required

The team key

memberIDsstring[]

A list of member IDs who belong to the team

namestring required

A human-friendly name for the team

roleAttributesRoleAttributeMap

Example request

{
  "customRoleKeys": [
    "example-role1",
    "example-role2"
  ],
  "description": "An example team",
  "key": "team-key-123abc",
  "memberIDs": [
    "12ab3c45de678910fgh12345"
  ],
  "name": "Example team",
  "permissionGrants": [
    {
      "actionSet": "maintainTeam",
      "actions": [
        "updateTeamMembers"
      ],
      "memberIDs": [
        "12ab3c45de678910fgh12345"
      ]
    }
  ]
}

Response

Teams response

descriptionstring

A description of the team

keystring

The team key

namestring

A human-friendly name for the team

_creationDateinteger
_linksobject

The location and content type of related resources

_lastModifiedinteger
_versioninteger

The team version

_idpSyncedboolean

Whether the team has been synced with an external identity provider (IdP). Team sync is available to customers on an Enterprise plan.

roleAttributesRoleAttributeMap

Example response

{
  "description": "Description for this team.",
  "key": "team-key-123abc",
  "name": "Example team",
  "_access": {
    "denied": [
      {
        "reason": {
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ],
          "effect": "allow"
        }
      }
    ],
    "allowed": [
      {
        "reason": {
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ],
          "effect": "allow"
        }
      }
    ]
  },
  "_links": {
    "parent": {
      "href": "/api/v2/teams",
      "type": "application/json"
    },
    "roles": {
      "href": "/api/v2/teams/example-team/roles",
      "type": "application/json"
    },
    "self": {
      "href": "/api/v2/teams/example-team",
      "type": "application/json"
    }
  },
  "_version": 3,
  "_idpSynced": true,
  "roles": {
    "totalCount": 1,
    "items": [
      {
        "key": "role-key-123abc",
        "name": "Example role",
        "projects": {
          "totalCount": 1,
          "items": [
            {
              "_links": {
                "environments": {
                  "href": "/api/v2/projects/example-project/environments",
                  "type": "application/json"
                },
                "self": {
                  "href": "/api/v2/projects/example-project",
                  "type": "application/json"
                }
              },
              "key": "project-key-123abc",
              "name": "Example project"
            }
          ]
        }
      }
    ],
    "_links": {
      "self": {
        "href": "/api/v2/teams/example-team/roles?limit=25",
        "type": "application/json"
      }
    }
  },
  "members": {
    "totalCount": 15
  },
  "projects": {
    "totalCount": 1,
    "items": [
      {
        "_links": {
          "environments": {
            "href": "/api/v2/projects/example-project/environments",
            "type": "application/json"
          },
          "self": {
            "href": "/api/v2/projects/example-project",
            "type": "application/json"
          }
        },
        "key": "project-key-123abc",
        "name": "Example project"
      }
    ]
  },
  "maintainers": {
    "totalCount": 1,
    "items": [
      {
        "_id": "569f183514f4432160000007",
        "_links": {
          "self": {
            "href": "/api/v2/members/569f183514f4432160000007",
            "type": "application/json"
          }
        },
        "email": "ariel@acme.com",
        "firstName": "Ariel",
        "lastName": "Flores",
        "role": "reader"
      }
    ],
    "_links": {
      "self": {
        "href": "/api/v2/teams/example-team/maintainers?limit=20",
        "type": "application/json"
      }
    }
  }
}