Skip to Content

Update a workspace role

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
PATCH
/api/v1/workspace-roles/{id}

Rename a workspace role and/or replace its permission set. Built-in (default) roles cannot be edited. Granting the ADMINISTRATOR permission requires that you already hold it.

Permission required: MANAGE_WORKSPACE_ROLES on the workspace.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string

Header Parameters

authorization*string

Bearer token for API authentication

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body

Update a workspace role

name?string

New role name

Length1 <= length
permissions?array<>

Replacement set of permission keys. Omit to leave permissions unchanged.

Response Body

Workspace role

application/json
  1. response

Workspace role

id*string

Immutable role identifier — pass this to addMember

name*string

Human-readable role name. Editable by org admins.

isDefault*boolean

True for the role that newly-invited members get by default

permissions*array<>

Permission keys granted by this role

memberCount*number

Number of workspace members currently assigned this role

createdAt*unknown
updatedAt*unknown
Example Request
curl -X PATCH 'https://app.sajn.se/api/v1/workspace-roles/string' \  -H 'authorization: string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "string",  "isDefault": true,  "permissions": [    "READ_DOCUMENT"  ],  "memberCount": 0,  "createdAt": null,  "updatedAt": null}

Was this page helpful?