Skip to content

Add user to organization

POST
/api/v1/users/{id}/organizations
curl --request POST \
--url http://localhost:3000/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/organizations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "organizationId": "550e8400-e29b-41d4-a716-446655440001", "roleId": "550e8400-e29b-41d4-a716-446655440002" }'

Adds a user to an organization with a specific role. Requires Super Admin privileges.

id
required
string format: uuid

User UUID

Media type application/json
object
organizationId
required

Organization UUID to add the user to

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440001
roleId
required

Role UUID to assign to the user in the organization

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440002

User added to organization successfully

Invalid input data

Unauthorized

Forbidden - Super Admin required

User or organization not found

User already belongs to this organization