Skip to Content

Users

Base path: https://gateway.useyona.com/a/v1/organizations/:orgId/users

Manage team members within your organization. Each user has a role and optional custom permissions that control what they can access.


Update user profile

PATCH /a/v1/organizations/:orgId/users/:id

bash
curl -X PATCH https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/users/f1e2d3c4-b5a6-7890-1234-567890abcdef \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Chidi",
    "lastName": "Okonkwo-Williams"
  }'

Change user role

PATCH /a/v1/organizations/:orgId/users/:id/role

Request body

FieldTypeRequiredDescription
roleIdstringYesNew role UUID
bash
curl -X PATCH https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/users/f1e2d3c4-b5a6-7890-1234-567890abcdef/role \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "roleId": "role_admin" }'

Change user status

PATCH /a/v1/organizations/:orgId/users/:id/status

Request body

FieldTypeRequiredDescription
statusstringYesactive, suspended, or deactivated
bash
curl -X PATCH https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/users/f1e2d3c4-b5a6-7890-1234-567890abcdef/status \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "status": "suspended" }'

Add user permissions

POST /a/v1/organizations/:orgId/users/:id/permissions

Request body

FieldTypeRequiredDescription
permissionsstring[]YesPermission strings to add
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/users/f1e2d3c4-b5a6-7890-1234-567890abcdef/permissions \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "permissions": ["invoice.create", "invoice.submit"] }'

Send phone verification

POST /a/v1/organizations/:orgId/users/:id/send-phone-verification

Sends an OTP to the user’s phone number for verification.

Request body

FieldTypeRequiredDescription
phoneNumberstringYesPhone number to verify (E.164 format)
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/users/f1e2d3c4-b5a6-7890-1234-567890abcdef/send-phone-verification \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "+2348012345678"
  }'

Verify phone

POST /a/v1/organizations/:orgId/users/:id/verify-phone

Verifies the OTP sent to the user’s phone number and marks the phone as verified.

Request body

FieldTypeRequiredDescription
phoneNumberstringYesPhone number being verified (E.164 format)
otpstringYesOne-time password received via SMS
bash
curl -X POST https://gateway.useyona.com/a/v1/organizations/9f8e7d6c-5b4a-3210-fedc-ba9876543210/users/f1e2d3c4-b5a6-7890-1234-567890abcdef/verify-phone \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "+2348012345678",
    "otp": "482901"
  }'

Other user endpoints

MethodPathDescription
GET/a/v1/organizations/:orgId/usersList users
GET/a/v1/organizations/:orgId/users/:idGet user (:id can be me)
GET/a/v1/organizations/:orgId/users/:id/permissionsGet permissions
DELETE/a/v1/organizations/:orgId/users/:id/permissionsRemove permissions
Last updated on