---
title: "Modify an account member"
method: PATCH
path: "/api/v2/members/{id}"
tags: ["Account members"]
---

# Modify an account member

`PATCH /api/v2/members/{id}`

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.

## Path parameters

- `id` string, string, required — The member ID

## Request body

- PatchOperation[]
  - `op` string, required — The type of operation to perform
  - `path` string, required — A JSON Pointer string specifying the part of the document to operate on
  - `value` string — A JSON value used in "add", "replace", and "test" operations

## Response `200`

Member response

- Member
  - `_links` object, required — The location and content type of related resources
  - `_id` string, required — The member's ID
  - `firstName` string — The member's first name
  - `lastName` string — The member's last name
  - `role` string, required — The member's base role. If the member has no additional roles, this role will be in effect.
  - `email` string, required — The member's email address
  - `_pendingInvite` boolean, required — Whether the member has a pending invitation
  - `_verified` boolean, required — Whether the member's email address has been verified
  - `_pendingEmail` string — The member's email address before it has been verified, for accounts where email verification is required
  - `customRoles` string[], required — The set of additional roles, besides the base role, assigned to the member
  - `mfa` string, required — Whether multi-factor authentication is enabled for this member
  - `excludedDashboards` string[] — Default dashboards that the member has chosen to ignore
  - `_lastSeen` integer, required
  - `_lastSeenMetadata` LastSeenMetadata
    - `tokenId` string — The ID of the token used in the member's last session
  - `_integrationMetadata` IntegrationMetadata
    - `externalId` string, required
    - `externalStatus` IntegrationStatus, required
      - `display` string, required
      - `value` string, required
    - `externalUrl` string, required
    - `lastChecked` integer, required
  - `teams` MemberTeamSummaryRep[] — Details on the teams this member is assigned to
    - `customRoleKeys` string[], required — A list of keys of the custom roles this team has access to
    - `key` string, required — The team key
    - `_links` object
    - `name` string, required — The team name
  - `permissionGrants` MemberPermissionGrantSummaryRep[] — 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.
    - `actionSet` string — The name of the group of related actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time.
    - `actions` string[] — A list of actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time.
    - `resource` string, required — The resource for which the actions are allowed
  - `creationDate` integer, required
  - `oauthProviders` OAuthProviderKind[] — A list of OAuth providers
  - `version` integer — Version of the current configuration
  - `roleAttributes` RoleAttributeMap

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `409` — Status conflict
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
