1. Docs
  2. API Reference
  3. Update the Account name or settings

Update the Account name or settings

PATCH/portal/v1/accounts/{accountSlug}

Updates the Account's display name and/or settings JSON; both body fields are optional and only what's provided is changed. settings replaces the whole object, so merge client-side to change a single key. slug is intentionally not editable here. Supply the version you read via the If-Match header for optimistic locking — a mismatch returns 409 with the current row. Writes an account.updated audit row.

Authentication

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Requires capability account.manageAccount

Edit account profile and general settings. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.

Path Parameters

accountSlugstring Required

Headers

  • if-match required
  • If-Match

    Optimistic-lock token — pass the `version` you read on GET. Mismatch returns 409.

Request body

application/json

namestring Optional

Display name shown in the dashboard chrome

settingsobject Optional

Account-level configuration (branding hints, SSO settings, etc.). Replaces the full settings object — merge on the client side if you only want to change one key.

Responses

application/json

  • dataAccountResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on.

403account.capability_requiredForbidden
When it happens

The signed-in user's administrator roles do not grant the capability this endpoint requires.

Remediation

Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.

Returned object

Request
curl -X PATCH "https://auth.canopy-io.com/portal/v1/accounts/value" \
  -H "if-match: value" \
  -H "If-Match: value" \
  -H "Authorization: Bearer $CANOPY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "settings": {}
  }'
Response
{
  "data": {
    "id": "string",
    "name": "string",
    "slug": "string",
    "settings": {},
    "plan": "string",
    "version": 0,
    "created_at": "2026-04-20T12:00:00.000Z",
    "updated_at": "2026-04-20T12:00:00.000Z",
    "delete_grace_days": 0
  }
}
Related endpoints
GETGet the current Account
DELETEDelete the Account (owner only)
Was this page helpful?

Tell us how we can improve this guide.