/v1/iam/usersAdd user to organization
Add a user to the organization by email. If the user already exists in the platform, they are added immediately. If not, an invitation email is sent and the user will be added upon accepting the invitation. Optionally specify groups to add the user to.
Request Body
requiredContent-Type: application/json
Email of the user to add
group_ids
arrayoptionalIDs of groups to add the user to
Responses
User added or invitation sent
Content-Type: application/json
user
objectoptionalA platform user linked to this organization for IAM
invitation
objectoptionalstatus
stringoptionalWhether the user was added directly or an invitation was sent
Enum: "added", "invited"
Invalid request parameters
Content-Type: application/json
error
objectrequiredAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredInsufficient permissions
Content-Type: application/json
error
objectrequiredUser is already a member or has a pending invitation
Content-Type: application/json
error
objectrequiredInternal server error
Content-Type: application/json
error
objectrequiredcurl -X POST "https://api.spo1.mycloud.com/v1/iam/users" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"email": "john.doe@acme.com","group_ids": ["550e8400-e29b-41d4-a716-446655440000"]}'
Response
User added or invitation sent
{"user": {"id": "550e8400-e29b-41d4-a716-446655440000","crn": "crn::iam:user:550e8400-e29b-41d4-a716-446655440000","email": "john.doe@acme.com","name": "John Doe","groups": [{"id": "550e8400-e29b-41d4-a716-446655440000","name": "string"}],"added_at": "2024-01-15T10:30:00Z"},"invitation": {"id": "550e8400-e29b-41d4-a716-446655440000","email": "jane.doe@example.com","groups": [{"id": "550e8400-e29b-41d4-a716-446655440000","name": "string"}],"invited_by": {"id": "550e8400-e29b-41d4-a716-446655440000","name": "string","email": "user@example.com"},"status": "pending","expires_at": "2024-01-15T10:30:00Z","created_at": "2024-01-15T10:30:00Z"},"status": "added"}