Skip to main content
PUT
/
api
/
v1
/
auth
/
user
/
id
/
{id}
/
role
curl --request PUT \
  --url https://crypto.westminister.tech/api/v1/auth/user/id/{id}/role \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "vendor"
}
'
{
  "id": "8d09359f-325a-4ecf-998d-dbe5eda3a498",
  "email": "michael.ochieng@gmail.com",
  "phone_number": "+254708374149",
  "first_name": "Michael",
  "last_name": "Juma",
  "role": "customer",
  "kyc_status": "pending"
}

Documentation Index

Fetch the complete documentation index at: https://docs.crypto.westminister.tech/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

User ID (UUID).

Body

application/json
role
enum<string>
required

User role. Master merchants use vendor with no parent_vendor_id. Sub-merchants use subvendor with parent_vendor_id set. admin can only be assigned via PUT /api/v1/auth/user/id/{id}/role by an existing admin.

Available options:
customer,
vendor,
subvendor,
user,
admin
Example:

"customer"

Response

Role updated