Platform API reference

Platform API · Workspaces

patch/v1/workspaces/{workspace_slug}/members/{account_id}/roleAuth

Update a member's role. Body: { roleId } or { role: "owner"|"admin"|"member" }.

Path parameters

workspace_slug*string

Slug of the workspace. Platform routes name the workspace by slug, positionally in the SDK (`platform.workspaces.retrieve("acme")`); the product APIs bind `workspace_id` instead.

account_id*string

Id of the account.

Request body

role_idstring

UUID of the role to assign. Use this to target custom roles.

Example: "11111111-1111-4111-8111-111111111111"

roleenum (3)

System role shortcut: 'owner' | 'admin' | 'member'. Either `roleId` or `role` must be supplied.

Response · 200

id*string · uuid

Id of the membership.

workspace_id*string · uuid

Id of the workspace.

account_id*string · uuid

Id of the member's account.

role_id*string · uuid

Id of the member's new role.

invited_by*string · uuid

Account id of the member who invited them, when they joined by invite.

joined_at*string · date-time

When the member joined the workspace.

Example

Request

PATCH https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_slug}/members/{account_id}/role
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "role_id": "11111111-1111-4111-8111-111111111111",
  "role": "owner"
}

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "account_id": "00000000-0000-0000-0000-000000000000",
  "role_id": "00000000-0000-0000-0000-000000000000",
  "invited_by": "00000000-0000-0000-0000-000000000000",
  "joined_at": "2026-01-01T00:00:00.000Z"
}