Skip to Content

Update a workspace member's 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/members/{userId}

Reassign a workspace member to a different role. roleId must reference a role on this workspace — discover roles via GET /api/v1/workspace-roles.

Permission required: MANAGE_WORKSPACE_MEMBERS 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

userId*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 member

roleId*string

Workspace role ID to assign. Look up IDs via GET /api/v1/workspace-roles.

Response Body

Workspace member

application/json
  1. response

Workspace member

userId*string

User ID — the stable handle for this member

email*string
name*string|null
role*

Workspace role

status*string
Value in"active""inactive"
lastActiveAt*unknown
joinedAt*unknown

When the user was added to the workspace

Example Request
curl -X PATCH 'https://app.sajn.se/api/v1/members/string' \  -H 'authorization: string' \  -H 'Content-Type: application/json' \  -d '{  "roleId": "string"}'
Example Response
{  "userId": "string",  "email": "string",  "name": "string",  "role": {    "id": "string",    "name": "string"  },  "status": "active",  "lastActiveAt": null,  "joinedAt": null}

Was this page helpful?