POST/spaces/members/add

Add users or groups to a space

Adds users and/or groups as members of a space. Supply spaceId, role, userIds, and groupIds; send an empty array for either ID list when you are not adding members of that type. Each ID list can contain at most 25 UUIDs.

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

4 body fields

Users and/or groups to add to the space. All four fields are required.

groupIdsarray<string>required
Group IDs to add as space members. All users in the group inherit access to the space. Max 25 per request.
rolestringrequired
Role assigned to all added members. `admin`: full control within the space including managing members. `writer`: can create and edit pages. `reader`: read-only access to pages.
Allowed:adminwriterreader
spaceIdstringrequired
ID of the space to add members to.
userIdsarray<string>required
User IDs to add as space members. Users already in the space are skipped. Max 25 per request.

3 status codes
200Confirms that the members were added.
dataunknownoptional
Response payload
statusintegeroptional
successbooleanoptional
400Returned when the request fails validation, including when an ID list exceeds 25 items or `role` is not an accepted value.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the authenticated user lacks permission to manage space members.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

The spaceId, role, userIds, and groupIds fields are required; send an empty array for an ID list you are not using. A 400 is returned when either ID list exceeds 25 items or role is not admin, writer, or reader. A 403 is returned when the authenticated user lacks Manage/Member permission for the space.