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
      • POSTAdd a member to teams
      • DELDelete account member
      • GETGet account member
      • POSTInvite new members
      • GETList account members
      • PATCHModify account members
      • PATCHModify an account member
    • 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
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewAccount Members

Invite new members

POST
/api/v2/members
POST
/api/v2/members
$curl -X POST https://app.launchdarkly.com/api/v2/members \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "email": "sandy@acme.com"
> }
>]'
1{
2 "items": [
3 {
4 "_links": {},
5 "_id": "507f1f77bcf86cd799439011",
6 "role": "reader",
7 "email": "ariel@acme.com",
8 "_pendingInvite": false,
9 "_verified": true,
10 "customRoles": [
11 "devOps",
12 "backend-devs"
13 ],
14 "mfa": "string",
15 "_lastSeen": 1608260796147,
16 "creationDate": 1628001602644,
17 "firstName": "Ariel",
18 "lastName": "Flores",
19 "_pendingEmail": "string",
20 "excludedDashboards": [
21 "string"
22 ],
23 "_lastSeenMetadata": {
24 "tokenId": "5b52207f8ca8e631d31fdb2b"
25 },
26 "_integrationMetadata": {
27 "externalId": "string",
28 "externalStatus": {
29 "display": "string",
30 "value": "string"
31 },
32 "externalUrl": "string",
33 "lastChecked": 1
34 },
35 "teams": [
36 {
37 "customRoleKeys": [
38 "access-to-test-projects"
39 ],
40 "key": "team-key-123abc",
41 "name": "QA Team",
42 "_links": {}
43 }
44 ],
45 "permissionGrants": [
46 {
47 "resource": "team/qa-team",
48 "actionSet": "string",
49 "actions": [
50 "maintainTeam"
51 ]
52 }
53 ],
54 "oauthProviders": [
55 "string"
56 ],
57 "version": 1,
58 "roleAttributes": {}
59 }
60 ],
61 "_links": {},
62 "totalCount": 1
63}
Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for "member/\*". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the "message" field of the response. Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles). If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope). Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).
Was this page helpful?
Previous

List account members

Next
Built with

Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a createMember permission for “member/*”. If a member cannot be invited, the entire request is rejected and no members are invited from that request.

Each member must have an email field and either a role or a customRoles field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the “message” field of the response.

Valid base role names that you can provide for the role field include reader, writer, admin, owner/admin, and no_access. To learn more about base roles, read Organization roles.

If you are using the customRoles field instead, you can provide the key for any role that you have created, or for any preset organization role or project role provided by LaunchDarkly. Some preset roles additionally require that you specify roleAttributes. To learn more, read Using role scope.

Requests to create account members will not work if SCIM is enabled for the account.

No more than 50 members may be created per request.

A request may also fail because of conflicts with existing members. These conflicts are reported using the additional code and invalid_emails response fields with the following possible values for code:

  • email_already_exists_in_account: A member with this email address already exists in this account.
  • email_taken_in_different_account: A member with this email address exists in another account.
  • duplicate_emails: This request contains two or more members with the same email address.

A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).

Authentication

Authorizationstring
API Key authentication via header

Request

This endpoint expects a list of objects.
emailstringRequired
The member's email
passwordstringOptional
The member's password
firstNamestringOptional
The member's first name
lastNamestringOptional
The member's last name
roleenumOptional
The member's initial role, if you are using a base role for the initial role
Allowed values:
customRoleslist of stringsOptional
An array of the member's initial roles, if you are using custom roles or preset roles provided by LaunchDarkly
teamKeyslist of stringsOptional
An array of the member's teams
roleAttributesmap from strings to lists of stringsOptional
An object of role attributes for the member

Response

Member collection response
itemslist of objects
An array of members
_linksmap from strings to objects
The location and content type of related resources
totalCountinteger
The number of members returned

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error