For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
      • POSTAdd multiple members to team
      • POSTCreate team
      • DELDelete team
      • GETGet team
      • GETGet team custom roles
      • GETGet team maintainers
      • GETList teams
      • PATCHUpdate team
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewTeams

Add multiple members to team

POST
/api/v2/teams/:teamKey/members
POST
/api/v2/teams/:teamKey/members
$curl -X POST https://app.launchdarkly.com/api/v2/teams/teamKey/members \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: multipart/form-data" \
> -F file=@<file1>
1{
2 "items": [
3 {
4 "status": "error",
5 "value": "new-team-member@acme.com",
6 "message": "string"
7 }
8 ]
9}
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](https://launchdarkly.com/docs/home/account/manage-teams#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: ```json { "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: ```json { "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.
Was this page helpful?
Previous

Create team

Next
Built with

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.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

teamKeystringRequiredformat: "string"
The team key

Request

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

Response

Team member imports response
itemslist of objects
An array of details about the members requested to be added to this team

Errors

400
Bad Request Error
401
Unauthorized Error
405
Method Not Allowed Error
429
Too Many Requests Error