Skip to main content
POST
/
teams
/
members
/
{userId}
/
role
Assign Role to Member
curl --request POST \
  --url https://api.rolla.xyz/api/v1/external/teams/members/{userId}/role \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "success": true,
  "message": "Role assigned successfully"
}
Assign a role to an existing team member. Use GET /teams/roles to retrieve the list of available roles and their IDs.

Example Request

curl -X POST "https://api.rolla.xyz/api/v1/external/teams/members/a1b2c3d4-e5f6-7890-abcd-ef1234567890/role" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": "c3d4e5f6-7890-abcd-ef12-34567890abcd"
  }'

Example Response

{
  "status": 200,
  "success": true,
  "message": "Role assigned successfully",
  "data": {}
}
The business_owner role cannot be assigned via this endpoint. Fetch assignable roles from GET /teams/roles — the list excludes owner-level roles automatically.
The target user must already be an accepted member of your business. You cannot assign a role to a pending invite.

Authorizations

X-API-Key
string
header
required

Your Rolla API key

Path Parameters

userId
string<uuid>
required

User UUID of the team member

Body

application/json
role_id
string<uuid>
required

UUID of the role to assign. Retrieve available roles from GET /teams/roles.

Response

Role assigned successfully

success
boolean
Example:

true

message
string
Example:

"Role assigned successfully"