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

Update the Account name or settings

PATCH/portal/v1/accounts/{accountSlug}

Authentication

  • Bearer Token Authorization

    JWT access token

Path Parameters

Name Required Type Description
accountSlugRequiredstring

Headers

  • if-match required
  • If-Match

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

Request body

  • namestring

    Display name shown in the dashboard chrome

  • settingsany object

    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.

Code samples

cURLJavaScriptPythonGo
curl -X PATCH "https://api.canopy.dev/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": {}
  }'

Responses

200 Account updated
{
  "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"
}

application/json

  • idstring*
  • namestring*
  • slugstring*
  • settingsany object*
  • planstring*
  • versionnumber*
  • created_atstring (date-time)*
  • updated_atstring (date-time)*
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)
409 Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry.

Returned object