POST/spaces/members/change-role

Change a member's space role

Requires Manage/Member space permission. Provide userId or groupId (not both).

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

4 body fields
groupIdstringoptional
ID of the group whose role to change. Mutually exclusive with `userId`.
rolestringrequired
New space role. `admin`: full control. `writer`: create and edit pages. `reader`: read-only.
Allowed:adminwriterreader
spaceIdstringrequired
ID of the space.
userIdstringoptional
ID of the user whose role to change. Mutually exclusive with `groupId`.

3 status codes
200Role updated
dataunknownoptional
Response payload
statusintegeroptional
successbooleanoptional
400Validation error
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Forbidden
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

A 400 is returned: Validation error. A 403 is returned: Forbidden.