Account members

The Account Members API allows you to invite new members to an account by making a POST request to /api/v2/members. When you invite a new member to an account, an invitation is sent to the email you provided. Members with "admin" or "owner" roles may create new members, as well as anyone with a "createMember" permission for "member/*".

Any member may request the complete list of account members with a GET to /api/v2/members.

List account members

Return a list of account members.

By default, this returns the first 20 members. Page through this list with the limit parameter and by following the first, prev, next, and last links in the returned _links field. These links are not present if 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.

Filtering members

LaunchDarkly supports three fields for filters: query, role, and lastSeen:

  • query is a string that matches against the members' emails and names. It is not case sensitive.
  • role is a | separated list of roles and custom roles. It filters the list to members who have any of the roles in the list. For the purposes of this filtering, Owner counts as Admin.
  • lastSeen is a JSON object in one of the following formats:
    • {"never": true} - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM.
    • {"noData": true} - Members that have not been active since LaunchDarkly began recording last seen timestamps.
    • {"before": 1608672063611} - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.

For example, the filter query:abc,role:admin|customrole matches members with the string abc in their email or name, ignoring case, who also are either an an Owner or Admin or have the custom role customrole.

Sorting members

LaunchDarkly supports two fields for sorting: displayName and lastSeen:

  • displayName sorts by first + last name, using the member's email if no name is set.
  • lastSeen sorts by the _lastSeen property. LaunchDarkly considers members that have never been seen or have no data the oldest.
Request
Security:
ApiKey (readwrite)
query Parameters
limit
integer <int64>

The number of members to return in the response. Defaults to 20.

offset
integer <int64>

Where to start in the list. This is for use with pagination. For example, an offset of 10 would skip the first ten items and then return the next limit items.

filter
string <string>

A comma-separated list of filters. Each filter is of the form field:value. Supported fields are explained above.

sort
string <string>

A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.

Responses
200

Member collection response JSON

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/members
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/members \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    },
  • "totalCount": 0
}

Invite new members

Full use of this API resource is only available to accounts with paid subscriptions

The ability to bulk invite members is a paid feature. Single members may be invited if not on a paid plan.

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.

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).

Request
Security:
ApiKey (readwrite)
Request Body schema: application/json
Array
email
required
string

The member's email

password
string

The member's password

firstName
string

The member's first name

lastName
string

The member's last name

role
string

The member's built-in role

customRoles
Array of strings

The member's custom role

Responses
201

Members response

400

Invalid request

401

Invalid access token

403

Forbidden

409

Status conflict

429

Rate limited

post/api/v2/members
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    },
  • "totalCount": 0
}

Get account member

Get a single account member by ID

Request
Security:
ApiKey (readwrite)
path Parameters
id
required
string <string>

The member ID

Responses
200

Member response JSON

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/members/{id}
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/members/:id \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_links": {
    },
  • "_id": "507f1f77bcf86cd799439011",
  • "firstName": "Bob",
  • "lastName": "Loblaw",
  • "role": "reader",
  • "email": "bob@loblaw.com",
  • "_pendingInvite": true,
  • "_verified": true,
  • "_pendingEmail": "string",
  • "customRoles": [
    ],
  • "mfa": "string",
  • "excludedDashboards": [
    ],
  • "_lastSeen": 0,
  • "_lastSeenMetadata": {
    },
  • "_integrationMetadata": {
    },
  • "teams": [
    ],
  • "permissionGrants": [
    ],
  • "creationDate": 0
}

Modify an account member

Update a single account member. The request should be a valid JSON Patch document describing the changes to be made to the member. Requests to update account members will not work if SCIM is enabled for the account.

Request
Security:
ApiKey (readwrite)
path Parameters
id
required
string <string>

The member ID

Request Body schema: application/json
Array
op
required
string

The type of operation to perform

path
required
string

A JSON Pointer string specifying the part of the document to operate on

value
required
any

A JSON value used in "add", "replace", and "test" operations

Responses
200

Member response JSON

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

409

Status conflict

429

Rate limited

patch/api/v2/members/{id}
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "_links": {
    },
  • "_id": "507f1f77bcf86cd799439011",
  • "firstName": "Bob",
  • "lastName": "Loblaw",
  • "role": "reader",
  • "email": "bob@loblaw.com",
  • "_pendingInvite": true,
  • "_verified": true,
  • "_pendingEmail": "string",
  • "customRoles": [
    ],
  • "mfa": "string",
  • "excludedDashboards": [
    ],
  • "_lastSeen": 0,
  • "_lastSeenMetadata": {
    },
  • "_integrationMetadata": {
    },
  • "teams": [
    ],
  • "permissionGrants": [
    ],
  • "creationDate": 0
}

Delete account member

Delete a single account member by ID. Requests to delete account members will not work if SCIM is enabled for the account.

Request
Security:
ApiKey (readwrite)
path Parameters
id
required
string <string>

The member ID

Responses
204

Action succeeded

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

409

Status conflict

429

Rate limited

delete/api/v2/members/{id}
Request samples
curl -i -X DELETE \
  https://app.launchdarkly.com/api/v2/members/:id \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "invalid key"
}