Skip to content

Set User Role

PUT
/tenant/{tenantId}/user/{userId}
curl --request PUT \
--url https://api.exolink.cloud/tenant/example/user/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "role": "Owner" }'

Set role for a specific user

tenantId
required
string

Tenant domain prefix

userId
required
string

User ID

Media typeapplication/json
object
role
required

User role in a tenant

string
Allowed values: Owner Admin ReadOnly

Role updated successfully

Media typeapplication/json

Empty object

object

Example generated

{}

Malformed request

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Bad Request",
"errorCode": "ERR_API_BAD_REQUEST"
}

Missing, invalid or expired credentials

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Not authorized",
"errorCode": "ERR_API_NOT_AUTHORIZED"
}

The caller may not perform this action

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Forbidden",
"errorCode": "ERR_API_FORBIDDEN"
}

Resource not found

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Charger '7' not found",
"errorCode": "ERR_API_RESOURCE_NOT_FOUND"
}

Validation or verification failed

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Missing parameter: displayName",
"errorCode": "ERR_API_VALIDATION_FAILED"
}