Add multiple members to team

POST
/api/v2/teams/:teamKey/members

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:

1{
2 "items": [
3 {
4 "status": "success",
5 "value": "new-team-member@acme.com"
6 },
7 {
8 "message": "Line 2: empty row",
9 "status": "error",
10 "value": ""
11 },
12 {
13 "message": "Line 3: email already exists in the specified team",
14 "status": "error",
15 "value": "existing-team-member@acme.com"
16 },
17 {
18 "message": "Line 4: invalid email formatting",
19 "status": "error",
20 "value": "invalid email format"
21 }
22 ]
23}
MessageResolution
Empty rowThis line is blank. Add an email address and try again.
Duplicate entryThis email address appears in the file twice. Remove the email from the file and try again.
Email already exists in the specified teamThis member is already on your team. Remove the email from the file and try again.
Invalid formattingThis email address is not formatted correctly. Fix the formatting and try again.
Email does not belong to a LaunchDarkly memberThe 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:

1{
2 "code": "invalid_request",
3 "message": "Unable to process file"
4}
MessageResolution
Unable to process fileLaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again.
File exceeds 25mbBreak up your file into multiple files of less than 25mbs each.
All emails have invalid formattingNone of the email addresses in the file are in the correct format. Fix the formatting and try again.
All emails belong to existing team membersAll 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 emptyThe CSV file does not contain any email addresses. Populate the file and try again.
No emails belong to members of your LaunchDarkly organizationNone of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.

Path parameters

teamKeystringRequired

The team key

Request

This endpoint expects a multipart form containing an optional file.
filefileOptional

Response

Team member imports response

itemslist of objectsOptional

An array of details about the members requested to be added to this team

Errors

Built with