/v1/workspaces/{workspace_slug}/members/{account_id}/roleAuthUpdate a member's role. Body: { roleId } or { role: "owner"|"admin"|"member" }.
Path parameters
workspace_slug*stringSlug 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*stringId of the account.
Request body
role_idstringUUID 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 · uuidId of the membership.
workspace_id*string · uuidId of the workspace.
account_id*string · uuidId of the member's account.
role_id*string · uuidId of the member's new role.
invited_by*string · uuidAccount id of the member who invited them, when they joined by invite.
joined_at*string · date-timeWhen 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"
}