TenantsUpdate user role
Tenants

Update user role

Updates the role of a user within a specific tenant.

curl -X PATCH "https://api.neostra.io/api/v1/tenant/example_string/user/example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -d '{
  "roleId": "example_string"
}'
{
  "status": 200,
  "message": "Success",
  "data": {},
  "errors": [
    "example_string"
  ]
}
PATCH
/api/v1/tenant/{tenantId}/user/{userId}
PATCH
Bearer Token (JWT)
Bearer Tokenstring
Required

JWT bearer token for authentication

JWT bearer token for authentication
path
tenantIdstring
Required

The tenant identifier

path
userIdstring
Required

The user identifier

Content-Typestring
Required

The media type of the request body

Options: application/json
roleIdstring
Required

The role identifier to assign to the user

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT bearer token for authentication

Path Parameters

tenantIdstring
Required

The tenant identifier

userIdstring
Required

The user identifier

Body

application/json
roleIdstring
Required

The role identifier to assign to the user

Responses

statusinteger

HTTP status code

messagestring

Response message

dataobject

Response payload

errorsstring[]

List of error details, if any