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/*". To learn more, read LaunchDarkly account members.
Any member may request the complete list of account members with a GET
to /api/v2/members
.
Valid built-in role names that you can provide for the role
field include reader
, writer
, admin
, owner/admin
, and no_access
. To learn more about built-in roles, read LaunchDarkly's built-in roles.
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.
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
.
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.Member collection response JSON
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X GET \ https://app.launchdarkly.com/api/v2/members \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "items": [
- {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "507f1f77bcf86cd799439011",
- "firstName": "Bob",
- "lastName": "Loblaw",
- "role": "reader",
- "email": "bob@loblaw.com",
- "_pendingInvite": true,
- "_verified": true,
- "_pendingEmail": "string",
- "customRoles": [
- "devOps",
- "backend-devs"
], - "mfa": "string",
- "excludedDashboards": [
- "string"
], - "_lastSeen": 0,
- "_lastSeenMetadata": {
- "tokenId": "5b52207f8ca8e631d31fdb2b"
}, - "_integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "teams": [
- {
- "customRoleKeys": [
- "string"
], - "key": "string",
- "name": "string"
}
], - "permissionGrants": [
- {
- "actionSet": "string",
- "actions": [
- "string"
], - "resource": "string"
}
], - "creationDate": 0
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "totalCount": 0
}
Full use of this API resource is only available to customers on an Enterprise plan
The ability to bulk invite members is an Enterprise feature. On a starter or Pro plan? You can invite members individually.
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
:
A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).
Members response
Invalid request
Invalid access token
Forbidden
Status conflict
Rate limited
[- {
- "email": "sandy@acme.com",
- "password": "***",
- "firstName": "Sandy",
- "lastName": "Smith",
- "role": "reader",
- "customRoles": [
- "customRole1",
- "customRole2"
]
}
]
{- "items": [
- {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "507f1f77bcf86cd799439011",
- "firstName": "Bob",
- "lastName": "Loblaw",
- "role": "reader",
- "email": "bob@loblaw.com",
- "_pendingInvite": true,
- "_verified": true,
- "_pendingEmail": "string",
- "customRoles": [
- "devOps",
- "backend-devs"
], - "mfa": "string",
- "excludedDashboards": [
- "string"
], - "_lastSeen": 0,
- "_lastSeenMetadata": {
- "tokenId": "5b52207f8ca8e631d31fdb2b"
}, - "_integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "teams": [
- {
- "customRoleKeys": [
- "string"
], - "key": "string",
- "name": "string"
}
], - "permissionGrants": [
- {
- "actionSet": "string",
- "actions": [
- "string"
], - "resource": "string"
}
], - "creationDate": 0
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "totalCount": 0
}
Get a single account member by member ID.
me
is a reserved value for the id
parameter and returns the caller's member information.
Member response JSON
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/members/{id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "507f1f77bcf86cd799439011",
- "firstName": "Bob",
- "lastName": "Loblaw",
- "role": "reader",
- "email": "bob@loblaw.com",
- "_pendingInvite": true,
- "_verified": true,
- "_pendingEmail": "string",
- "customRoles": [
- "devOps",
- "backend-devs"
], - "mfa": "string",
- "excludedDashboards": [
- "string"
], - "_lastSeen": 0,
- "_lastSeenMetadata": {
- "tokenId": "5b52207f8ca8e631d31fdb2b"
}, - "_integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "teams": [
- {
- "customRoleKeys": [
- "string"
], - "key": "string",
- "name": "string"
}
], - "permissionGrants": [
- {
- "actionSet": "string",
- "actions": [
- "string"
], - "resource": "string"
}
], - "creationDate": 0
}
Update a single account member. The request should be a valid JSON Patch document describing the changes to be made to the member.
To update fields in the account member object that are arrays, set the path
to the name of the field and then append /<array index>
. Using /0
appends to the beginning of the array. For example, to add a new custom role to a member, use the following request body:
[
{
"op": "add",
"path": "/customRoles/0",
"value": "some-role-id"
}
]
Requests to update account members will not work if SCIM is enabled for the account.
Member response JSON
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Status conflict
Rate limited
[- {
- "op": "add",
- "path": "/role",
- "value": "writer"
}
]
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "507f1f77bcf86cd799439011",
- "firstName": "Bob",
- "lastName": "Loblaw",
- "role": "reader",
- "email": "bob@loblaw.com",
- "_pendingInvite": true,
- "_verified": true,
- "_pendingEmail": "string",
- "customRoles": [
- "devOps",
- "backend-devs"
], - "mfa": "string",
- "excludedDashboards": [
- "string"
], - "_lastSeen": 0,
- "_lastSeenMetadata": {
- "tokenId": "5b52207f8ca8e631d31fdb2b"
}, - "_integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "teams": [
- {
- "customRoleKeys": [
- "string"
], - "key": "string",
- "name": "string"
}
], - "permissionGrants": [
- {
- "actionSet": "string",
- "actions": [
- "string"
], - "resource": "string"
}
], - "creationDate": 0
}
Delete a single account member by ID. Requests to delete account members will not work if SCIM is enabled for the account.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Status conflict
Rate limited
curl -i -X DELETE \ 'https://app.launchdarkly.com/api/v2/members/{id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "code": "unauthorized",
- "message": "invalid key"
}
Add one member to one or more teams.
Member response JSON
Invalid request
Invalid access token
Forbidden
Status conflict
Rate limited
{- "teamKeys": [
- "team1",
- "team2"
]
}
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "507f1f77bcf86cd799439011",
- "firstName": "Bob",
- "lastName": "Loblaw",
- "role": "reader",
- "email": "bob@loblaw.com",
- "_pendingInvite": true,
- "_verified": true,
- "_pendingEmail": "string",
- "customRoles": [
- "devOps",
- "backend-devs"
], - "mfa": "string",
- "excludedDashboards": [
- "string"
], - "_lastSeen": 0,
- "_lastSeenMetadata": {
- "tokenId": "5b52207f8ca8e631d31fdb2b"
}, - "_integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "teams": [
- {
- "customRoleKeys": [
- "string"
], - "key": "string",
- "name": "string"
}
], - "permissionGrants": [
- {
- "actionSet": "string",
- "actions": [
- "string"
], - "resource": "string"
}
], - "creationDate": 0
}