SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Admin

Change user role

POST/api/v1/users/:id/role

Changes a user's platform role. Admin-only.

Requires Authorization
ADMIN only
Authenticated action

Path parameters

idstringrequired
User ID.

Body parameters

rolestringrequired
One of BUYER, SELLER, RIDER, SUPPORT, ADMIN.
reasonstring
Optional internal note.
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/users/:id/role \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "BUYER",
  "reason": "<reason>"
}'
200Example response
{
  "success": true,
  "data": {
    "id": "3f2a1c9e-7b41-4e2a-9c31-8e6b2d4f10aa",
    "name": "Aline Mapendo",
    "role": "SUPPORT",
    "email": "aline@example.com",
    "isEmailVerified": true,
    "phone": "243812345678",
    "isPhoneVerified": true,
    "preferredCurrency": "USD",
    "avatarUrl": "https://res.cloudinary.com/dx3wclabo/image/upload/v1/avatars/aline.jpg",
    "isBlocked": false,
    "createdAt": "2026-01-14T10:32:00.000Z"
  }
}