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 the following fields for filters:
queryis a string that matches against the members' emails and names. It is not case sensitive.roleis 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,Ownercounts asAdmin.idis a|separated list of member IDs. It filters the list to members who match any of the IDs in the list.emailis a|separated list of member emails. It filters the list to members who match any of the emails in the list.teamis a string that matches against the key of the teams the members belong to. It is not case sensitive.noteamis a boolean that filters the list of members who are not on a team if true and members on a team if false.lastSeenis 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.
accessCheckis a string that represents a specific action on a specific resource and is in the format<ActionSpecifier>:<ResourceSpecifier>. It filters the list to members who have the ability to perform that action on that resource. Note:accessCheckis only supported in API version20220603and earlier. To learn more, read Versioning.- For example, the filter
accessCheck:createApprovalRequest:proj/default:env/test:flag/alternate-pagematches members with the ability to create an approval request for thealternate-pageflag in thetestenvironment of thedefaultproject. - Wildcard and tag filters are not supported when filtering for access.
- For example, the filter
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 Owner or Admin or have the custom role customrole.
Sorting members
LaunchDarkly supports two fields for sorting: displayName and lastSeen:
displayNamesorts by first + last name, using the member's email if no name is set.lastSeensorts by the_lastSeenproperty. LaunchDarkly considers members that have never been seen or have no data the oldest.
Expanding the members response
LaunchDarkly supports two fields for expanding the "List members" response. By default, these fields are not included in the response.
To expand the response, append the expand query parameter and add a comma-separated list with any of the following fields:
customRolesincludes a list of the roles that you have assigned to the member.roleAttributesincludes a list of the role attributes that you have assigned to the member.
For example, expand=roleAttributes includes roleAttributes field in the response.
Authorization
ApiKey read, writeIn: header
Scope: read, write
Query Parameters
The number of members to return in the response. Defaults to 20.
int64Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query limit.
int64A comma-separated list of filters. Each filter is of the form field:value. Supported fields are explained above.
stringA comma-separated list of properties that can reveal additional information in the response.
stringA comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.
stringResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/members"{ "items": [ { "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }, "_id": "507f1f77bcf86cd799439011", "firstName": "Ariel", "lastName": "Flores", "role": "reader", "email": "ariel@acme.com", "_pendingInvite": false, "_verified": true, "_pendingEmail": "string", "customRoles": [ "devOps", "backend-devs" ], "mfa": "string", "excludedDashboards": [ "string" ], "_lastSeen": "1608260796147", "_lastSeenMetadata": { "tokenId": "5b52207f8ca8e631d31fdb2b" }, "_integrationMetadata": { "externalId": "string", "externalStatus": { "display": "string", "value": "string" }, "externalUrl": "string", "lastChecked": 0 }, "teams": [ { "customRoleKeys": [ "access-to-test-projects" ], "key": "team-key-123abc", "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }, "name": "QA Team" } ], "permissionGrants": [ { "actionSet": "string", "actions": [ "maintainTeam" ], "resource": "team/qa-team" } ], "creationDate": "1628001602644", "oauthProviders": [ "string" ], "hasPassword": true, "version": 1, "roleAttributes": { "property1": [ "string" ], "property2": [ "string" ] }, "mfaEnforced": true, "mfaGracePeriodExpiresAt": 0 } ], "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }, "totalCount": 0}Delete audit log subscription DELETE
Delete an audit log subscription.
Invite new members POST
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. You can assign new members to teams with the `teamKeys` field. Teams are available only on Enterprise plans. If your plan does not include teams, a request that includes a non-empty `teamKeys` field returns an HTTP response code of 403 (Forbidden). Omit `teamKeys` to invite members without assigning them to a team. _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).