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

Modify an account member

PATCH
/api/v2/members/:id
PATCH
/api/v2/members/:id
$curl -X PATCH https://app.launchdarkly.com/api/v2/members/id \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "op": "add",
> "path": "/role",
> "value": null
> }
>]'
1{
2 "_links": {},
3 "_id": "507f1f77bcf86cd799439011",
4 "role": "reader",
5 "email": "ariel@acme.com",
6 "_pendingInvite": false,
7 "_verified": true,
8 "customRoles": [
9 "devOps",
10 "backend-devs"
11 ],
12 "mfa": "string",
13 "_lastSeen": 1608260796147,
14 "creationDate": 1628001602644,
15 "firstName": "Ariel",
16 "lastName": "Flores",
17 "_pendingEmail": "string",
18 "excludedDashboards": [
19 "string"
20 ],
21 "_lastSeenMetadata": {
22 "tokenId": "5b52207f8ca8e631d31fdb2b"
23 },
24 "_integrationMetadata": {
25 "externalId": "string",
26 "externalStatus": {
27 "display": "string",
28 "value": "string"
29 },
30 "externalUrl": "string",
31 "lastChecked": 1
32 },
33 "teams": [
34 {
35 "customRoleKeys": [
36 "access-to-test-projects"
37 ],
38 "key": "team-key-123abc",
39 "name": "QA Team",
40 "_links": {}
41 }
42 ],
43 "permissionGrants": [
44 {
45 "resource": "team/qa-team",
46 "actionSet": "string",
47 "actions": [
48 "maintainTeam"
49 ]
50 }
51 ],
52 "oauthProviders": [
53 "string"
54 ],
55 "version": 1,
56 "roleAttributes": {}
57}
Update a single account member. Updating a member uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). 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>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end 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" } ] ``` You can update only an account member's role or custom role using a JSON patch. Members can update their own names and email addresses though the LaunchDarkly UI. When SAML SSO or SCIM is enabled for the account, account members are managed in the Identity Provider (IdP). Requests to update account members will succeed, but the IdP will override the update shortly afterwards.
Was this page helpful?
Previous

Account Usage Beta

Next
Built with

Update a single account member. Updating a member uses a JSON patch representation of the desired changes. To learn more, read Updates.

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>. Use /0 to add to the beginning of the array. Use /- to add to the end 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"
}
]

You can update only an account member’s role or custom role using a JSON patch. Members can update their own names and email addresses though the LaunchDarkly UI.

When SAML SSO or SCIM is enabled for the account, account members are managed in the Identity Provider (IdP). Requests to update account members will succeed, but the IdP will override the update shortly afterwards.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

idstringRequiredformat: "string"
The member ID

Request

This endpoint expects a list of objects.
opstringRequired
The type of operation to perform
pathstringRequired
A JSON Pointer string specifying the part of the document to operate on
valueanyOptional
A JSON value used in "add", "replace", and "test" operations

Response

Member response
_linksmap from strings to objects
The location and content type of related resources
_idstring
The member's ID
rolestring
The member's base role. If the member has no additional roles, this role will be in effect.
emailstring
The member's email address
_pendingInviteboolean
Whether the member has a pending invitation
_verifiedboolean
Whether the member's email address has been verified
customRoleslist of strings
The set of additional roles, besides the base role, assigned to the member
mfastring

Whether multi-factor authentication is enabled for this member

_lastSeenlong

The member’s last session date (as Unix milliseconds since epoch)

creationDatelong
Timestamp of when the member was created
firstNamestring
The member's first name
lastNamestring
The member's last name
_pendingEmailstring
The member's email address before it has been verified, for accounts where email verification is required
excludedDashboardslist of strings
Default dashboards that the member has chosen to ignore
_lastSeenMetadataobject
Additional metadata associated with the member's last session, for example, whether a token was used
_integrationMetadataobject
Details on the member account in an external source, if this member is provisioned externally
teamslist of objects
Details on the teams this member is assigned to
permissionGrantslist of objects
A list of permission grants. Permission grants allow a member to have access to a specific action, without having to create or update a custom role.
oauthProviderslist of strings
A list of OAuth providers
versioninteger
Version of the current configuration
roleAttributesmap from strings to lists of strings
The role attributes for the member

Errors

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