Add a member to an organization
Gives an existing Cubicle user a role in the organization. The user is found by identity, matched exactly: case-sensitive and not trimmed. This route cannot invite someone who has no account.
The route writes the membership whether or not one exists:
- A user who is not a member becomes one with
role. - An active member's role is set to
role, higher or lower than before.roledefaults tomemberwhen omitted. - A removed member becomes active again with
role, and the Box grants they held before apply again.
Owners and admins may call this route. Setting role: "owner" needs the owner role; an admin may still set an owner's role to admin or member. It needs a sign-in session; API keys are refused.
Service accounts hold only member or admin, and only in their own organization; create them with Create a service account. See Change a member's role before you lower an owner's role.
sessionAuthorizationBearer <token>A sign-in session token (jvs_…) from the Dashboard, cubicle login or the device authorization flow.
org*stringThe organization's ID or name. An organization where the caller is not an active member returns 404.
application/json- body
identity*string3 <= length <= 254role?string"member""owner""admin""member"The membership as written, for a new or an existing member alike.
application/json- response
id*stringThe user's ID.
uuididentity*stringThe identity from the request.
role*RoleThe role the membership now has.
"owner""admin""member"curl -X POST 'https://api.cubicle.sh/v1/orgs/acme/members' \ -H 'Content-Type: application/json' \ -d '{ "identity": "ada@example.com", "role": "admin"}'{ "id": "2c4e6a8b-0d1f-4e3a-9b5c-7d9f1b3d5e7a", "identity": "ada@example.com", "role": "admin"}
