Update the Account name or settings
/portal/v1/accounts/{accountSlug}Authentication
- Bearer Token
AuthorizationJWT access token
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
accountSlug | string |
Headers
if-matchrequiredIf-MatchOptimistic-lock token — pass the `version` you read on GET. Mismatch returns 409.
Request body
namestringDisplay name shown in the dashboard chrome
settingsany objectAccount-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
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": {}
}'const response = await fetch("https://api.canopy.dev/portal/v1/accounts/value", {
method: "PATCH",
headers: {
"if-match": "value",
"If-Match": "value",
"Authorization": "Bearer $CANOPY_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"settings": {}
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://api.canopy.dev/portal/v1/accounts/value",
headers={
"if-match": "value",
"If-Match": "value",
"Authorization": "Bearer $CANOPY_TOKEN",
"Content-Type": "application/json"
},
json={
"name": "string",
"settings": {},
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"name": "string",
"settings": map[string]interface{}{},
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", "https://api.canopy.dev/portal/v1/accounts/value", bytes.NewBuffer(body))
req.Header.Set("if-match", "value")
req.Header.Set("If-Match", "value")
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}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
id *stringname *stringslug *stringsettings *any objectplan *stringversion *numbercreated_at *string (date-time)updated_at *string (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.