Update a role

​

Change a custom role name, description or permissions. Send If-Match with the ETag from the latest role GET or write response. The protected organization-admin role does not allow permission changes.

Path Parameters

Headers

  • ETag from a create or update response you already have, or from the latest GET when you have none.

Body

required
application/json

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/external/v2/roles/{roleId}
curl https://sales-api.artemis.solar/external/v2/roles/123e4567-e89b-12d3-a456-426614174000 \
  --request PATCH \
  --header 'If-Match: "copy-the-etag-from-your-latest-get"' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_SECRET_TOKEN' \
  --data '{
  "permissions": [
    "project:view_team"
  ]
}'
Custom role updated
{
  "data": {
    "id": "da7c1b2e-39f4-4c95-a816-8e27b4d1f530",
    "name": "Project coordinator",
    "description": "Coordinates assigned projects",
    "permissions": [
      "project:view_team"
    ],
    "createdAt": "2026-09-05T12:00:00.000Z",
    "updatedAt": "2026-09-05T12:01:00.000Z"
  }
}