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.

OperationMethod and path
Get the current accountGET /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

bash
curl https://api.sevennadi.si/user/me \
  -H "Authorization: Bearer vk-0123456789abcdef0123456789abcdef"

Response 200 OK

With a dashboard session token:

json
{
  "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}
}
FieldTypeDescription
idstringAccount id.
name, emailstringThe account's name and email.
walletnumberWallet balance in major units of the billing currency.
currencystringThe 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_numbersbooleanWhen true, the account can only call numbers it has verified. See Verified numbers.
memberobject or nullThe team member who is logged in. null when the request uses an API key.
rolestringThe role the request acts with: viewer, member, admin or owner. An API key always acts as admin.
email_verifiedbooleanWhether the login's email address is confirmed.
concurrency.maxintegerThe most calls the account may run at the same time.
concurrency.currentintegerCalls that are live right now (initiated, ringing or in-progress).

Errors

StatusMessage
401Access denied (missing, unknown or revoked key)
401Session expired
429Too 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.

RoleMay do
viewerRead everything that is not listed below as admin-only.
memberAlso create and change agents, knowledge bases, batches, dispositions, workflows and campaigns, and place calls.
adminAlso 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.
ownerAlso 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.