Create a workspace role
2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.Create a custom workspace role with a set of permission keys. Discover valid permission keys via GET /api/v1/workspace-permissions. Granting the ADMINISTRATOR permission requires that you already hold it.
Permission required: MANAGE_WORKSPACE_ROLES on the workspace.
AuthorizationBearer <token>Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
Idempotency-Key?stringMakes 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.
length <= 255Body
application/json- body
Create a workspace role
name*stringRole name
1 <= lengthpermissions*array<>Permission keys to grant. Discover valid keys via GET /api/v1/workspace-permissions.
[]Workspace role
application/json- response
Workspace role
id*stringImmutable role identifier — pass this to addMember
name*stringHuman-readable role name. Editable by org admins.
isDefault*booleanTrue for the role that newly-invited members get by default
permissions*array<>Permission keys granted by this role
memberCount*numberNumber of workspace members currently assigned this role
createdAt*unknownupdatedAt*unknowncurl -X POST 'https://app.sajn.se/api/v1/workspace-roles' \ -H 'authorization: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "permissions": []}'{ "id": "string", "name": "string", "isDefault": true, "permissions": [ "READ_DOCUMENT" ], "memberCount": 0, "createdAt": null, "updatedAt": null}Was this page helpful?