Users
User management for the platform. Most endpoints require manager role or above.
Endpoints
| Method | Endpoint | Description | Minimum Role |
|---|---|---|---|
GET | /api/v1/users/me | Current user data | attendant |
GET | /api/v1/users | List users | manager |
POST | /api/v1/users | Create user | manager |
GET | /api/v1/users/:id | Get user by ID | manager |
PUT | /api/v1/users/:id | Update user | manager |
Note
The DELETE endpoint is not available. Users are deactivated by updating the active field.
Current User
Returns the authenticated user's data.
GET /api/v1/users/meRequest Example
bash
curl -X GET https://voki.avanter.com.br/api/v1/users/me \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Success Response (200)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "João Silva",
"email": "joao@empresa.com",
"role": "attendant",
"active": true,
"avatar_url": null,
"mfa_enabled": false,
"locale": "pt-BR",
"inserted_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-01T14:20:00Z"
}
}List Users
Returns a paginated list of the tenant's users.
GET /api/v1/usersQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
page_size | integer | 20 | Items per page (max 100) |
sort_by | string | name | Sort field (name, email, role, inserted_at) |
sort_order | string | asc | Direction (asc, desc) |
search | string | - | Filter by name or email |
role | string | - | Filter by role (attendant, supervisor, manager) |
active | boolean | - | Filter by active/inactive status |
Request Example
bash
curl -X GET "https://voki.avanter.com.br/api/v1/users?page=1&page_size=10&role=attendant" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Success Response (200)
json
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "João Silva",
"email": "joao@empresa.com",
"role": "attendant",
"active": true,
"avatar_url": null,
"mfa_enabled": false,
"locale": "pt-BR",
"inserted_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-01T14:20:00Z"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Maria Santos",
"email": "maria@empresa.com",
"role": "attendant",
"active": true,
"avatar_url": "https://example.com/avatar.jpg",
"mfa_enabled": true,
"locale": "pt-BR",
"inserted_at": "2026-01-20T08:00:00Z",
"updated_at": "2026-01-20T08:00:00Z"
}
],
"meta": {
"current_page": 1,
"page_size": 10,
"total_pages": 3,
"total_count": 25
}
}Create User
Creates a new user in the tenant.
POST /api/v1/usersRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Full name (min 2 characters) |
email | string | Yes | Unique email within the tenant |
password | string | Yes | Password (min 8 characters) |
role | string | Yes | Role: attendant, supervisor, or manager |
locale | string | No | Language: pt-BR, en-US, es-ES, fr (default: pt-BR) |
Request Example
bash
curl -X POST https://voki.avanter.com.br/api/v1/users \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"user": {
"name": "Pedro Oliveira",
"email": "pedro@empresa.com",
"password": "securePassword123",
"role": "attendant",
"locale": "pt-BR"
}
}'Success Response (201)
json
{
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "Pedro Oliveira",
"email": "pedro@empresa.com",
"role": "attendant",
"active": true,
"avatar_url": null,
"mfa_enabled": false,
"locale": "pt-BR",
"inserted_at": "2026-02-18T10:00:00Z",
"updated_at": "2026-02-18T10:00:00Z"
}
}Errors
| Code | Description |
|---|---|
422 | Invalid data (duplicate email, weak password, etc.) |
403 | Permission denied (insufficient role) |
json
{
"errors": {
"email": ["has already been taken"]
}
}Get User
Returns a specific user's data.
GET /api/v1/users/:idPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | uuid | User ID |
Request Example
bash
curl -X GET https://voki.avanter.com.br/api/v1/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Success Response (200)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "João Silva",
"email": "joao@empresa.com",
"role": "attendant",
"active": true,
"avatar_url": null,
"mfa_enabled": false,
"locale": "pt-BR",
"inserted_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-01T14:20:00Z"
}
}Errors
| Code | Description |
|---|---|
404 | User not found |
Update User
Updates an existing user's data.
PUT /api/v1/users/:idRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Full name |
email | string | No | |
password | string | No | New password |
role | string | No | New role |
active | boolean | No | Activate/deactivate |
locale | string | No | Language |
Request Example
bash
curl -X PUT https://voki.avanter.com.br/api/v1/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"user": {
"role": "supervisor",
"active": true
}
}'Success Response (200)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "João Silva",
"email": "joao@empresa.com",
"role": "supervisor",
"active": true,
"avatar_url": null,
"mfa_enabled": false,
"locale": "pt-BR",
"inserted_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-18T11:00:00Z"
}
}