Teams is an Enterprise feature
Teams is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.
A team is a group of members in your LaunchDarkly account. A team can have maintainers who are able to add and remove team members. It also can have custom roles assigned to it that allows shared access to those roles for all team members. To learn more, read Teams.
The Teams API allows you to create, read, update, and delete a team.
Several of the endpoints in the Teams API require one or more member IDs. The member ID is returned as part of the List account members response. It is the _id
field of each element in the items
array.
Return a list of teams.
By default, this returns the first 20 teams. Page through this list with the limit
parameter and by following the first
, prev
, next
, and last
links in the _links
field that returns. If those links do not appear, the pages they refer to don't exist. For example, the first
and prev
links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.
LaunchDarkly supports the following fields for filters:
query
is a string that matches against the teams' names and keys. It is not case-sensitive.query:abc
returns teams with the string abc
in their name or key.nomembers
is a boolean that filters the list of teams who have 0 membersnomembers:true
returns teams that have 0 membersnomembers:false
returns teams that have 1 or more membersLaunchDarkly supports expanding several fields in the "List teams" 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.maintainers
includes a paginated list of the maintainers that you have assigned to the team.For example, expand=members,maintainers
includes the members
and maintainers
fields in the response.
Teams collection response
Invalid access token
Method not allowed
Rate limited
{- "items": [
- {
- "description": "Description for this team.",
- "key": "team-key-123abc",
- "name": "Example team",
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_creationDate": 0,
- "_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"
}
}, - "_lastModified": 0,
- "_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"
}
]
}, - "appliedOn": 0
}
], - "_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=5",
- "type": "application/json"
}
}
}
}
], - "_links": {
- "self": {
- "href": "/api/v2/teams?expand=maintainers%2Cmembers%2Croles%2Cprojects&limit=20",
- "type": "application/json"
}
}, - "totalCount": 1
}
Create a team. To learn more, read Creating a team.
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.
Teams response
Invalid request
Invalid access token
Method not allowed
Rate limited
{- "customRoleKeys": [
- "example-role1",
- "example-role2"
], - "description": "An example team",
- "key": "team-key-123abc",
- "memberIDs": [
- "12ab3c45de678910fgh12345"
], - "name": "Example team"
}
{- "description": "Description for this team.",
- "key": "team-key-123abc",
- "name": "Example team",
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_creationDate": 0,
- "_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"
}
}, - "_lastModified": 0,
- "_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"
}
]
}, - "appliedOn": 0
}
], - "_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=5",
- "type": "application/json"
}
}
}
}
Fetch a team by key.
LaunchDarkly supports four fields for expanding the "Get 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.
Teams response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Method not allowed
Rate limited
{- "description": "Description for this team.",
- "key": "team-key-123abc",
- "name": "Example team",
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_creationDate": 0,
- "_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"
}
}, - "_lastModified": 0,
- "_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"
}
]
}, - "appliedOn": 0
}
], - "_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=5",
- "type": "application/json"
}
}
}
}
Perform a partial update to a team. Updating a team uses the semantic patch format.
To make a semantic patch request, you must append domain-model=launchdarkly.semanticpatch
to your Content-Type
header. To learn more, read Updates using semantic patch.
Semantic patch requests support the following kind
instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the List account members response. It is the _id
field of each element in the items
array.
Adds custom roles to the team. Team members will have these custom roles granted to them.
values
: List of custom role keys.Here's an example:
{
"instructions": [{
"kind": "addCustomRoles",
"values": [ "example-custom-role" ]
}]
}
Removes custom roles from the team. The app will no longer grant these custom roles to the team members.
values
: List of custom role keys.Here's an example:
{
"instructions": [{
"kind": "removeCustomRoles",
"values": [ "example-custom-role" ]
}]
}
Adds members to the team.
values
: List of member IDs to add.Here's an example:
{
"instructions": [{
"kind": "addMembers",
"values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Removes members from the team.
values
: List of member IDs to remove.Here's an example:
{
"instructions": [{
"kind": "removeMembers",
"values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Replaces the existing members of the team with the new members.
values
: List of member IDs of the new members.Here's an example:
{
"instructions": [{
"kind": "replaceMembers",
"values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Adds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an actionSet
or a list of actions
but not both at the same time. The members do not have to be team members to have a permission grant for the team.
actionSet
: Name of the action set.actions
: List of actions.memberIDs
: List of member IDs.Here's an example:
{
"instructions": [{
"kind": "addPermissionGrants",
"actions": [ "updateTeamName", "updateTeamDescription" ],
"memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Removes permission grants from members for the team. A permission grant may have either an actionSet
or a list of actions
but not both at the same time. The actionSet
and actions
must match an existing permission grant.
actionSet
: Name of the action set.actions
: List of actions.memberIDs
: List of member IDs.Here's an example:
{
"instructions": [{
"kind": "removePermissionGrants",
"actions": [ "updateTeamName", "updateTeamDescription" ],
"memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Updates the description of the team.
value
: The new description.Here's an example:
{
"instructions": [{
"kind": "updateDescription",
"value": "Updated team description"
}]
}
Updates the name of the team.
value
: The new name.Here's an example:
{
"instructions": [{
"kind": "updateName",
"value": "Updated team name"
}]
}
LaunchDarkly supports four fields for expanding the "Update 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.
Teams response
Invalid request
Invalid access token
Invalid resource identifier
Method not allowed
Status conflict
Rate limited
{- "comment": "Optional comment about the update",
- "instructions": [
- {
- "kind": "updateDescription",
- "value": "New description for the team"
}
]
}
{- "description": "Description for this team.",
- "key": "team-key-123abc",
- "name": "Example team",
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_creationDate": 0,
- "_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"
}
}, - "_lastModified": 0,
- "_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"
}
]
}, - "appliedOn": 0
}
], - "_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=5",
- "type": "application/json"
}
}
}
}
Delete a team by key. To learn more, read Delete a team.
Action succeeded
Invalid access token
Invalid resource identifier
Rate limited
{- "code": "unauthorized",
- "message": "Invalid access token"
}
Fetch the maintainers that have been assigned to the team. To learn more, read Manage team maintainers.
Team maintainers response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Method not allowed
Rate limited
{- "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=5",
- "type": "application/json"
}
}
}
Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read Manage team members.
Members are only added on a 201
response. A 207
indicates the CSV file contains a combination of valid and invalid entries. A 207
results in no members being added to the team.
On a 207
response, if an entry contains bad input, the message
field contains the row number as well as the reason for the error. The message
field is omitted if the entry is valid.
Example 207
response:
{
"items": [
{
"status": "success",
"value": "new-team-member@acme.com"
},
{
"message": "Line 2: empty row",
"status": "error",
"value": ""
},
{
"message": "Line 3: email already exists in the specified team",
"status": "error",
"value": "existing-team-member@acme.com"
},
{
"message": "Line 4: invalid email formatting",
"status": "error",
"value": "invalid email format"
}
]
}
Message | Resolution |
---|---|
Empty row | This line is blank. Add an email address and try again. |
Duplicate entry | This email address appears in the file twice. Remove the email from the file and try again. |
Email already exists in the specified team | This member is already on your team. Remove the email from the file and try again. |
Invalid formatting | This email address is not formatted correctly. Fix the formatting and try again. |
Email does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team. |
On a 400
response, the message
field may contain errors specific to this endpoint.
Example 400
response:
{
"code": "invalid_request",
"message": "Unable to process file"
}
Message | Resolution |
---|---|
Unable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again. |
File exceeds 25mb | Break up your file into multiple files of less than 25mbs each. |
All emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again. |
All emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again. |
File is empty | The CSV file does not contain any email addresses. Populate the file and try again. |
No emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team. |
Team member imports response
Partial Success
Invalid request
Invalid access token
Method not allowed
Rate limited
{- "items": [
- {
- "message": "string",
- "status": "error",
- "value": "new-team-member@acme.com"
}
]
}
Fetch the custom roles that have been assigned to the team. To learn more, read Manage team permissions.
Team roles response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Method not allowed
Rate limited
{- "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"
}
]
}, - "appliedOn": 0
}
], - "_links": {
- "self": {
- "href": "/api/v2/teams/example-team/roles?limit=25",
- "type": "application/json"
}
}
}