1. Docs
  2. API Reference
  3. Update an Account identity profile

Update an Account identity profile

PATCH/portal/v1/accounts/{accountSlug}/identities/{id}

Authentication

  • Bearer Token Authorization

    JWT access token

Path Parameters

Name Required Type Description
idRequiredstring

Request body

  • first_namestring
  • last_namestring
  • metadataany object

    Customer-defined metadata blob (jsonb). Replaces the existing metadata on write; pass `null` to clear.

Code samples

cURLJavaScriptPythonGo
curl -X PATCH "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/identities/value" \
  -H "Authorization: Bearer $CANOPY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "string",
    "last_name": "string",
    "metadata": {}
  }'

Responses

200 Updates first_name / last_name / metadata. Email and external_id are updated through a separate flow (email changes require re-verification, external_id is owned by SSO/SCIM when those features ship).
{
  "id": "string",
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "avatar_url": "string",
  "external_id": "string",
  "metadata": {},
  "is_active": false,
  "email_verified": false,
  "email_verified_at": "2026-04-20T12:00:00.000Z",
  "locked_until": "2026-04-20T12:00:00.000Z",
  "password_changed_at": "2026-04-20T12:00:00.000Z",
  "app_membership_count": 0,
  "total_assignments": 0,
  "created_at": "2026-04-20T12:00:00.000Z",
  "app_memberships": [
    {
      "id": "string",
      "application_id": "string",
      "application_slug": "string",
      "application_name": "string",
      "status": "active",
      "created_at": "2026-04-20T12:00:00.000Z",
      "assignment_count": 0
    }
  ]
}

application/json

  • idstring*
  • emailstring*
  • first_namestring*
  • last_namestring*
  • avatar_urlstring
  • external_idstring
  • metadataany object
  • is_activeboolean*
  • email_verifiedboolean*
  • email_verified_atstring (date-time)
  • locked_untilstring (date-time)

    When non-null and in the future, the identity is locked out from login attempts. Set by the progressive lockout policy on repeated failed logins.

  • password_changed_atstring (date-time)
  • app_membership_countnumber*
  • total_assignmentsnumber*
  • created_atstring (date-time)*
  • app_membershipsAccountIdentityAppMembershipDto[]*

    Every active AppMembership for this identity, ordered by Application name. Each entry carries the App's slug + name so the drawer can render links without an additional lookup, plus the per-App assignment count.

401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)
404 Identity not found

Returned object

On this page

Related endpoints

GETList identities in Account
POSTCreate an Account identity
POSTBulk-create Account identities
GETGet directory counts for the Account
GETGet an Account identity
PATCHSet Account-wide is_active flag
POSTAdmin-trigger a password reset email
POSTRe-send email verification
GETList audit events for an Account identity
POSTAdd an identity to an Application (create AppMembership)
DELETERemove an identity from an Application (revoke AppMembership)