API reference
Account
Read the account behind a key, its wallet balance and its concurrency.
This page covers the one core route that describes the caller: who the key belongs to, what role it acts with, the wallet balance and how many calls are running. It is also the simplest way to check that a key works. Logins, API keys, team members and billing have their own pages: Auth, Team and Billing.
| Operation | Method and path |
|---|---|
| Get the current account | GET /user/me |
Operations
Get the current account
GET /user/me
Returns the account that the bearer key or session token belongs to.
Auth: API key or session token. Role: viewer and up.
No parameters.
Request
curl https://api.sevennadi.si/user/me \
-H "Authorization: Bearer vk-0123456789abcdef0123456789abcdef"Response 200 OK
With a dashboard session token:
{
"id": "4a257495-4e4b-484e-92e5-c616a720ec03",
"name": "Example Bank",
"email": "ops@example.test",
"wallet": 5.0,
"currency": "INR",
"restrict_to_verified_numbers": false,
"member": {
"id": "0de07680-dfeb-4cac-8235-3dac16055a92",
"name": "Asha Rao",
"email": "ops@example.test",
"role": "owner"
},
"role": "owner",
"email_verified": true,
"concurrency": {"max": 10, "current": 0}
}| Field | Type | Description |
|---|---|---|
id | string | Account id. |
name, email | string | The account's name and email. |
wallet | number | Wallet balance in major units of the billing currency. |
currency | string | The billing currency, a three-letter code from the deployment's price book. Every price and cost in the API is in this currency. |
restrict_to_verified_numbers | boolean | When true, the account can only call numbers it has verified. See Verified numbers. |
member | object or null | The team member who is logged in. null when the request uses an API key. |
role | string | The role the request acts with: viewer, member, admin or owner. An API key always acts as admin. |
email_verified | boolean | Whether the login's email address is confirmed. |
concurrency.max | integer | The most calls the account may run at the same time. |
concurrency.current | integer | Calls that are live right now (initiated, ringing or in-progress). |
Errors
| Status | Message |
|---|---|
| 401 | Access denied (missing, unknown or revoked key) |
| 401 | Session expired |
| 429 | Too many requests. Back off and retry with exponential backoff. |
Roles at a glance
Roles rise in this order: viewer, member, admin, owner. The same rules apply to every page of this reference.
| Role | May do |
|---|---|
| viewer | Read everything that is not listed below as admin-only. |
| member | Also create and change agents, knowledge bases, batches, dispositions, workflows and campaigns, and place calls. |
| admin | Also change phone numbers, SIP trunks, provider keys, custom models, sub-accounts, compliance settings and the do-not-call list, manage API keys and team members, and trigger webhook tests and resends. |
| owner | Also change billing, transfer ownership and delete the workspace. |
A request with a role that is too low answers 403, for example Your role (viewer) can't change provider keys. It needs admin access; ask an owner or admin of the workspace. See Authentication.