Update permission metadata
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/permissions/{id}Authentication
- Bearer Token
AuthorizationJWT access token
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
id | string |
Headers
if-matchrequiredIf-MatchOptimistic-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
descriptionstringUpdated description
categorystringUpdated category
Code samples
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"
}'const response = await fetch("https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/permissions/value", {
method: "PATCH",
headers: {
"if-match": "value",
"If-Match": "value",
"Authorization": "Bearer $CANOPY_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "string",
"category": "string"
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/permissions/value",
headers={
"if-match": "value",
"If-Match": "value",
"Authorization": "Bearer $CANOPY_TOKEN",
"Content-Type": "application/json"
},
json={
"description": "string",
"category": "string",
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"description": "string",
"category": "string",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/permissions/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 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
id *stringapplication_id *stringkey *stringdescriptionstringcategorystringsource *enum: "system" | "custom"created_at *string (date-time)version *numberOptimistic-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.