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
Change user role
PATCH /a/v1/organizations/:orgId/users/:id/role
Request body
| Field | Type | Required | Description |
|---|---|---|---|
roleId | string | Yes | New role UUID |
Change user status
PATCH /a/v1/organizations/:orgId/users/:id/status
Request body
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | active, suspended, or deactivated |
Add user permissions
POST /a/v1/organizations/:orgId/users/:id/permissions
Request body
| Field | Type | Required | Description |
|---|---|---|---|
permissions | string[] | Yes | Permission strings to add |
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
| Field | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Yes | Phone number to verify (E.164 format) |
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
| Field | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Yes | Phone number being verified (E.164 format) |
otp | string | Yes | One-time password received via SMS |
Other user endpoints
| Method | Path | Description |
|---|---|---|
GET | /a/v1/organizations/:orgId/users | List users |
GET | /a/v1/organizations/:orgId/users/:id | Get user (:id can be me) |
GET | /a/v1/organizations/:orgId/users/:id/permissions | Get permissions |
DELETE | /a/v1/organizations/:orgId/users/:id/permissions | Remove permissions |
Last updated on