1. Docs
  2. API Reference
  3. Update permission metadata

Update permission metadata

PATCH/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/permissions/{id}

Authentication

  • Bearer Token Authorization

    JWT access token

Path Parameters

Name Required Type Description
idRequiredstring

Headers

  • if-match required
  • If-Match

    Optimistic-lock version of the resource. Send the `version` field returned on read; the server rejects with 409 if the row has changed since.

Request body

  • descriptionstring

    Updated description

  • categorystring

    Updated category

Code samples

cURLJavaScriptPythonGo
curl -X PATCH "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/permissions/value" \
  -H "if-match: value" \
  -H "If-Match: value" \
  -H "Authorization: Bearer $CANOPY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "string",
    "category": "string"
  }'

Responses

200 Permission updated
{
  "id": "string",
  "application_id": "string",
  "key": "string",
  "description": "string",
  "category": "string",
  "source": "system",
  "created_at": "2026-04-20T12:00:00.000Z",
  "version": 0
}

application/json

  • idstring*
  • application_idstring*
  • keystring*
  • descriptionstring
  • categorystring
  • sourceenum: "system" | "custom"*
  • created_atstring (date-time)*
  • versionnumber*

    Optimistic-lock version. Send back as the `If-Match` header when updating to detect concurrent edits.

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

On this page

Related endpoints

GETList permission catalog
POSTRegister new permission(s)
GETGet a permission
DELETERemove a permission