Developer platform · v2

API reference

View as MarkdownAll docs

Team

14 operations · all resources

What this covers#

Invite people to work in your account as Admin, Editor or Viewer (no seat fee, at most 25 people and open invites). A member signs in with their own account and sends X-Acting-Account: <your account id> with every console request; the server checks the membership and the role on each one. A team account's activity (every change, and every download of conversation content or money documents) is kept 365 days. Console door only, on our own host.

Every example below runs as written once these are exported:

bash
export DVAARIK_TOKEN="<account access token>"   # console session, from POST /console/auth/login
export INVITE_ID="<uuid>"
export MEMBER_ID="<uuid>"
export USER_ID="<uuid>"

A <value> inside a JSON body is a value you supply. Responses are JSON; every error body is { "detail": … }. Each schema is expanded once per page, where it first appears.

Account door errors#

StatusCause
401No account session was presented, or it is invalid or expired. Refresh once, then re-authenticate.
403The account is suspended or its email is not verified.

Operations — account session#

The same resource through the console door. These are what the web console calls; both doors return the same shapes.

POST /console/auth/team-invite#

Who a team invite link is for (the account, who invited, the address, the role, until when), before signing in. No session needed; any bad or used link answers one sentence.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationteamInvitePeek
Success200 TeamInvitePeek

Request body: TeamInviteToken.

TeamInviteToken#

FieldTypeRequiredNotes
tokenstringyesmin length 20; max length 100; The token from the invite link's fragment.

TeamInvitePeek#

FieldTypeRequiredNotes
account_namestringyesThe account you are invited to.
emailstringyesThe address the invite is for.
expires_atdate-timeyes
inviter_namestringyes
role"admin" or "editor" or "viewer"yes
ErrorWhen
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/auth/team-invite" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "<token>"
  }'

GET /console/v2/team#

The team of the account the request works in: its owner, members with their roles, invites not yet accepted or revoked, and the seats used (members plus open invites).

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetTeam
Success200 TeamView

TeamView#

FieldTypeRequiredNotes
enabledbooleanyes
inbound_links_to_changeintegernodefault 0; How many numbers still use an inbound link a former Admin could see. Change each one and paste the new link into the carrier.
invitesTeamInviteInfo[]yesInvites not yet accepted or revoked (open or expired).
membersTeamMemberInfo[]yes
ownerTeamOwneryes
recording_sincedate-time or nullyesWhen the audit log started (the first invite).
seats_maxintegeryes
seats_usedintegeryesMembers plus open invites.
your_rolestringyesowner, admin, editor or viewer.

TeamInviteInfo#

FieldTypeRequiredNotes
created_atdate-timeyes
emailstringyes
expires_atdate-timeyes
iduuidyes
last_sent_atdate-time or nullyes
role"admin" or "editor" or "viewer"yes
sent_countintegeryesHow many times the mail went (at most 5).
state"open" or "expired" or "accepted" or "revoked"yes

TeamMemberInfo#

FieldTypeRequiredNotes
emailstringyes
member_iduuidyesThe member's own account id.
namestringyes
role"admin" or "editor" or "viewer"yes
sincedate-timeyes

TeamOwner#

FieldTypeRequiredNotes
account_iduuidyes
emailstringyes
namestringyes

FieldErrors#

A 422 from a route that names its fields: every field that failed validation, or one sentence when the request validated and was then refused.

FieldTypeRequiredNotes
detailstring or FieldError[]yesThe fields that failed validation (each named), or a sentence for the developer.

FieldError#

One request field that failed validation, NAMED (routes on core.field_errors.FieldErrorRoute).

FieldTypeRequiredNotes
fieldstring or nullyesThe field, as a path into the request: checks[2].text, max_turns, test_ids[0], run_id. Null when the error is about the request body as a whole (it is missing or is not JSON).
locstring or integer[]yesFastAPI's location: where the value came from (body, query or path), then the path into it as the validator reported it.
messagestringyesWhat is wrong with the field, without its name.
msgstringyesOne sentence naming the field and what is wrong with it, e.g. checks[2].text: text is required. The same as message when field is null.
typestringyesThe validator's error type: missing, value_error, extra_forbidden, ...
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/team" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/team/accounts#

The accounts you can work in: your own first, then each team you are in, with your role.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListTeamAccounts
Success200 TeamAccounts

TeamAccounts#

FieldTypeRequiredNotes
accountsTeamAccount[]yesYour own account first (role owner), then the teams you are in.
enabledbooleanyes

TeamAccount#

FieldTypeRequiredNotes
account_iduuidyesSend this as X-Acting-Account to work in the account.
companystring or nullyes
emailstringyes
namestringyes
rolestringyesowner (your own account), admin, editor or viewer.
sincedate-time or nullyesWhen you joined (null for your own account).
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/team/accounts" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/team/audit#

The account's activity, newest first: who (with their role then), what, where, the outcome and the address it came from; never what was typed or downloaded. Page with before = the last page's next_before.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListTeamAudit
Success200 AuditPage
ParameterInTypeRequiredNotes
beforequeryuuid or nullnoAn event id from next_before: the page older than it.
limitqueryintegerno1 to 100 events (default 50).
actor_idqueryuuid or nullnoOnly this person's actions.
project_idqueryuuid or nullnoOnly actions in this project.

AuditPage#

FieldTypeRequiredNotes
eventsAuditEventInfo[]yes
next_beforeuuid or nullyesPass as before for the next (older) page; null at the end.
recording_sincedate-time or nullyesWhen this account started recording (its first invite).

AuditEventInfo#

FieldTypeRequiredNotes
actionstringyesThe door's stable key.
actorAuditActoryes
atdate-timeyes
detailobject<string> or nullyesTeam changes only: email, role, old_role, member_id, invite_id.
iduuidyes
ipstring or nullyesThe address the request came from.
labelstringyesWhat happened, in words.
methodstringyes
outcome"done" or "refused" or "failed"yesdone (2xx/3xx), refused (4xx) or failed (5xx, or 499: the browser left before any answer; read the resource itself to see what changed).
project_iduuid or nullyes
routestringyesThe route template, never the raw path.
status_codeintegeryes
targetobject<string> or nullyesThe path's ids; any other path value (a phone number, for example) is 'redacted'.

AuditActor#

FieldTypeRequiredNotes
emailstringyesThe person's address as it was when they acted.
rolestringyesowner, admin, editor or viewer, as it was when they acted.
user_iduuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/team/audit?limit=20" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/team/credentials#

What each person made in this account that still works: API keys apart from everything else, exact counts and the newest 50 items. Members first, then people no longer in the team. Made before this was recorded: not listed.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListTeamCredentials
Success200 TeamCredentials

TeamCredentials#

FieldTypeRequiredNotes
not_listed_notestringyesCredentials made before who made them was recorded are not listed: where to check them.
peoplePersonCredentials[]yesMembers first (team order), then people no longer in the team. The owner is never listed.

PersonCredentials#

FieldTypeRequiredNotes
api_keysintegeryesActive API keys this person made (all projects).
emailstring or nullyesTheir address (as it was when they made the newest item, once they left).
itemsCredentialItem[]yesNewest first, at most 50; the counts are exact.
member_rolestring or nullyesadmin, editor or viewer while still in the team; null once they left.
otherintegeryesTheir other credentials still active: website call button keys, webhook endpoints, agents that send data out, AI accounts, carriers, chat channels, Resell domains, mail and payment accounts.
user_iduuidyesThe person's own account id.

CredentialItem#

FieldTypeRequiredNotes
created_atdate-timeyes
detailstring or nullyesA line about it, never a secret: a key's prefix and scopes, an endpoint's host, a provider.
iduuidyes
kind"api_key" or "publishable_key" or "webhook_endpoint" or "agent" or "provider_account" or "carrier" or "chat_channel" or "reseller_domain" or "reseller_mail" or "reseller_payment" or "api_credential"yes
namestringyes
project_iduuid or nullyesIts project; null for account-wide Resell items.
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/team/credentials" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/team/invites#

Invite someone by email as admin, editor or viewer. The mail goes from us with a one-time link valid for 7 days that opens only for an account with that address. Shares a budget of 20 an hour and 50 a day per account with Resend.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleCreateTeamInvite
Success201 TeamInviteSent

Request body: TeamInviteIn.

TeamInviteIn#

FieldTypeRequiredNotes
emailstringyesThe person's address. The invite opens only for an account with it.
role"admin" or "editor" or "viewer"yesadmin (connects outside accounts, holds keys, money, privacy, the team and Resell), editor (builds and runs agents, tests, knowledge, call lists, chats, webhooks, alerts) or viewer (reads; never changes or spends).

TeamInviteSent#

FieldTypeRequiredNotes
inviteTeamInviteInfoyes
mail_sentbooleanyesFalse when the mail could not be sent: the invite stays; press Resend.
problemstring or nullyesWhy the mail did not go, in words; null when it went.
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/team/invites" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@example.com",
    "role": "admin"
  }'

DELETE /console/v2/team/invites/{invite_id}#

Revoke an open invite: its link stops working.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleRevokeTeamInvite
Success200 TeamInviteInfo
ParameterInTypeRequiredNotes
invite_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/console/v2/team/invites/$INVITE_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/team/invites/{invite_id}/resend#

Send an open or expired invite again with a new link valid for 7 days; the old link stops working. At most 5 sends per invite.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleResendTeamInvite
Success200 TeamInviteSent
ParameterInTypeRequiredNotes
invite_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/team/invites/$INVITE_ID/resend" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/team/invites/accept#

Accept an invite with the token from its link, signed in with the address it was sent to. Acts as you whatever X-Acting-Account says.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleAcceptTeamInvite
Success200 TeamAccount

Request body: TeamInviteToken.

ErrorWhen
400invite_invalid: the link is invalid or expired.
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/team/invites/accept" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "<token>"
  }'

POST /console/v2/team/leave#

Leave a team you are in. Your own account is not affected.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleLeaveTeam
Success200 TeamLeft

Request body: TeamLeaveIn.

TeamLeaveIn#

FieldTypeRequiredNotes
account_iduuidyesThe account whose team you leave.

TeamLeft#

FieldTypeRequiredNotes
account_iduuidyes
leftbooleanyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/team/leave" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "<account_id uuid>"
  }'

DELETE /console/v2/team/members/{member_id}#

Remove a member: their next request in this account is refused. Rotate any API keys or webhook secrets they had.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleRemoveTeamMember
Success200 TeamMemberRemoved
ParameterInTypeRequiredNotes
member_idpathuuidyes

TeamMemberRemoved#

FieldTypeRequiredNotes
api_keys_activeintegernodefault 0; API keys this person made that still work.
inbound_links_to_changeintegernodefault 0; How many numbers still use an inbound link someone who has lost access could see. Change each one and paste the new link into the carrier.
member_iduuidyes
not_listed_notestringyesCredentials made before who made them was recorded are not counted: where to check them.
notestringyesWhat to do next: keys and secrets they saw belong to the account.
other_credentials_activeintegernodefault 0; Their other credentials still active (see the Team page).
removedbooleanyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/console/v2/team/members/$MEMBER_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

PATCH /console/v2/team/members/{member_id}#

Change a member's role (member_id is their own account id). It applies to their next request.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleUpdateTeamMember
Success200 TeamMemberInfo
ParameterInTypeRequiredNotes
member_idpathuuidyes

Request body: TeamMemberIn.

TeamMemberIn#

FieldTypeRequiredNotes
role"admin" or "editor" or "viewer"yesadmin (connects outside accounts, holds keys, money, privacy, the team and Resell), editor (builds and runs agents, tests, knowledge, call lists, chats, webhooks, alerts) or viewer (reads; never changes or spends).
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404invite_not_found or member_not_found: not of this team.
409A refusal with its code: switched_off, invite_self, already_member, invite_exists, team_full, invite_closed, send_limit, invite_wrong_account, teams_full, owner_unavailable.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X PATCH "https://api.developers.dvaarik.com/console/v2/team/members/$MEMBER_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "admin"
  }'

POST /console/v2/team/people/{user_id}/revoke-api-keys#

Revoke every API key this person made in this account that still works: new requests with them are refused at once; calls and sessions already started finish. Nothing else they made is touched (each needs replacing where it was typed). Pressing it again revokes nothing more. The account owner's own keys are revoked one at a time on Projects and keys.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleRevokePersonApiKeys
Success200 PersonKeysRevoked
ParameterInTypeRequiredNotes
user_idpathuuidyes

PersonKeysRevoked#

FieldTypeRequiredNotes
api_keysintegeryesAPI keys this person made that still work after it.
otherintegeryesTheir other credentials still active (never touched by this).
revokedintegeryesAPI keys revoked by this request (0 when none still worked).
user_iduuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
409A refusal with its code: switched_off, or owner_keys (the account owner's keys are revoked one at a time on Projects and keys).
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/team/people/$USER_ID/revoke-api-keys" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/team/session#

Who you are, which account this request works in, your role there and what that role may do (can: view, edit, admin, owner).

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetTeamSession
Success200 TeamSession

TeamSession#

FieldTypeRequiredNotes
accountTeamOwneryesThe account this request acted in.
actingbooleanyesTrue while you work in another person's account.
canobject<boolean>yesWhat your role may do: view, edit, admin, owner.
enabledbooleanyes
rolestringyesYour role in the account: owner, admin, editor or viewer.
youTeamOwneryesYou, the signed-in person.
ErrorWhen
401No account session was presented, or it is invalid or expired.
403Not allowed: role_forbidden (your role in the account), not_a_member, team_unavailable, or the account is unavailable.
404The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed.
422The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field.

Plus the account-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/team/session" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

Try it without a key in the browser

The playground opens a real voice session with your account session, so a project key never reaches a browser. Machine calls belong on your own server.