Skip to main content

Assign user to organization

You can assign a user to an organization by using the following endpoint.

HTTP request

PUT https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/organization/$organizationId

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance.
userIdpathstringrequiredThe ID of the user.
organizationIdpathstringrequiredThe ID of the organization.

Example request

userId=your-user-id-123
organizationId=your-organization-id-123
curl --request PUT "https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/organization/$organizationId" \
--header "Authorization: Bearer $accessKey"

HTTP response

On success

HTTP/1.1 204 is returned if the user is successfully assigned to the organization.

On missing user

HTTP/1.1 404 is returned if the user with the given userId is not found.

On missing organization

HTTP/1.1 404 is returned if the organization with the given organizationId is not found.

On failure

HTTP/1.1 401 is returned if the authorization fails due to an invalid access key.

HTTP/1.1 500 is returned if an unexpected error occurs.