API reference
Projects API
7 operations · all resources
What this covers#
A project is the isolation boundary: credentials, keys, agents, numbers, sessions and webhooks all belong to exactly one. Create one per environment or per customer. Its zero retention switch decides whether it stores any conversation content, and "delete stored conversations" removes what it stored before.
Every example below runs as written once these are exported:
export DVAARIK_API_KEY="dvk_..." # project API key, server side only
export DVAARIK_TOKEN="<account access token>" # console session, from POST /console/auth/login
export PROJECT_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.
Machine door errors#
Raised by the project-key dependency before any handler on this page runs.
| Status | Cause |
|---|---|
401 | Missing API key or Invalid API key — the X-Api-Key header is absent, unknown, or revoked. |
403 | API key is not scoped to a project, Project unavailable, or API key is missing the required scope '<scope>'. |
429 | The project's api_rpm ceiling was exceeded. Honour Retry-After; X-RateLimit-* headers are on every response. |
Scopes used on this page: project:read. Mint a key with only these.
Account door errors#
| Status | Cause |
|---|---|
401 | No account session was presented, or it is invalid or expired. Refresh once, then re-authenticate. |
403 | The account is suspended or its email is not verified. |
Operations — project API key#
Call these from your own server with a project key. Never from a browser or a mobile bundle.
GET /v2/project/retention#
Read the project's zero retention: whether it is on, who changed it and when (the console door only; the machine door leaves out who), every recorded change, and what is kept right now, in words.
| Detail | Value |
|---|---|
| Door | Project API key — X-Api-Key: $DVAARIK_API_KEY |
| Scope | project:read |
| Operation | getProjectRetention |
| Success | 200 ProjectRetentionInfo |
ProjectRetentionInfo#
The project's zero-retention switch, its history and what is kept.
| Field | Type | Required | Notes |
|---|---|---|---|
changed_at | date-time or null | no | |
changed_by | RetentionChangedBy or null | no | |
changes | RetentionChange[] | no | |
project_id | uuid | yes | |
what_is_kept | string | yes | |
zero_retention | boolean | yes | Zero retention: while it is on, we store no conversation content for this project's calls, chats and agent test runs admitted from that moment, whatever each agent's store_transcript, record_calls, retention_days or insight_config says. A call keeps only its ids, times, duration, cost, status, end reason (agent_ended when the agent hung up, never the model's words), carrier status, counts and speed summary: no transcript, no summary or extracted fields, no recording reference (the carrier is not asked to record) and no tool arguments or results. A chat message is kept for the 24-hour reply window (the next reply needs it) and then deleted; a reply keeps the names of the tools it called, never what went in or came back. Webhooks and live sockets still deliver exactly as configured, except that anything we would have to store to deliver it is left out: the completed-call webhook's transcript and chat events' text are null, and zeroRetention says why. A test run keeps its verdicts, not its conversation or a judge's reason. Content stored before it was turned on is not deleted by the switch: delete it with POST .../stored-conversations/delete. Turning it off needs confirm_turn_off: true and is recorded with who and when. |
RetentionChange#
One change of the switch: to what, when, by whom, on which door. user_id and email are null on the machine door (any key with project:read reads it); the console shows them.
| Field | Type | Required | Notes |
|---|---|---|---|
at | date-time | yes | |
door | string or null | no | |
email | string or null | no | |
user_id | string or null | no | |
zero_retention | boolean | yes |
RetentionChangedBy#
| Field | Type | Required | Notes |
|---|---|---|---|
door | string or null | no | |
email | string or null | no | |
user_id | string or null | no |
| Error | When |
|---|---|
422 | The request body or query is not valid. detail is an array of {loc, msg, type} and loc names the offending field. |
Plus the machine-door errors above. Full list on the errors page.
curl -sS -X GET "https://api.developers.dvaarik.com/v2/project/retention" \
-H "X-Api-Key: $DVAARIK_API_KEY"Operations — account session#
The same resource through the console door. These are what the web console calls; both doors return the same shapes.
GET /console/v2/projects/{project_id}/retention#
Read the project's zero retention: whether it is on, who changed it and when (the console door only; the machine door leaves out who), every recorded change, and what is kept right now, in words.
| Detail | Value |
|---|---|
| Door | Account session — Authorization: Bearer $DVAARIK_TOKEN |
| Operation | consoleGetProjectRetention |
| Success | 200 ProjectRetentionInfo |
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
project_id | path | uuid | yes |
| Error | When |
|---|---|
401 | No account session was presented, or it is invalid or expired. |
403 | The account is suspended or its email is not verified. |
404 | The 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. |
422 | The 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.
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/retention" \
-H "Authorization: Bearer $DVAARIK_TOKEN"PUT /console/v2/projects/{project_id}/retention#
Turn zero retention on (it applies to calls, chats and test runs that start from now on) or off. Off needs confirm_turn_off: true; without it the answer is a 422 sentence and nothing changes. Every change is recorded with who and when.
| Detail | Value |
|---|---|
| Door | Account session — Authorization: Bearer $DVAARIK_TOKEN |
| Operation | consoleSetProjectRetention |
| Success | 200 ProjectRetentionInfo |
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
project_id | path | uuid | yes |
Request body: ProjectRetentionUpdate.
ProjectRetentionUpdate#
Turn zero retention on or off. Off needs confirm_turn_off: true: new calls and chats can then store content again, as their agents are set up.
| Field | Type | Required | Notes |
|---|---|---|---|
confirm_turn_off | boolean | no | default false |
zero_retention | boolean | yes |
| Error | When |
|---|---|
401 | No account session was presented, or it is invalid or expired. |
403 | The account is suspended or its email is not verified. |
404 | The 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. |
409 | The project or resource is in a state that refuses this change. |
422 | The 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.
curl -sS -X PUT "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/retention" \
-H "Authorization: Bearer $DVAARIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"zero_retention": true
}'POST /console/v2/projects/{project_id}/stored-conversations/delete#
Delete the project's stored conversation content in one bounded pass: transcripts, summaries, recording references, chat messages, test runs' chats, hand-off reasons and stored webhook bodies. Call again at once while progress is true; after retry_after_seconds when a pass changed nothing because what is left is in use. done is true only when nothing is left. Call records and billing stay.
| Detail | Value |
|---|---|
| Door | Account session — Authorization: Bearer $DVAARIK_TOKEN |
| Operation | consoleDeleteStoredConversations |
| Success | 200 StoredConversationsDeleted |
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
project_id | path | uuid | yes |
StoredConversationsDeleted#
One bounded pass of "delete stored conversations". done is true only when nothing of the project's stored conversation content is left. Call again while it is false: at once while progress is true; after retry_after_seconds when a pass could change nothing because everything left was busy (skipped).
| Field | Type | Required | Notes |
|---|---|---|---|
archived_recordings_scheduled | integer | yes | |
calls_cleared | integer | yes | |
chat_conversations_deleted | integer | yes | |
chat_messages_deleted | integer | yes | |
done | boolean | yes | |
handoff_reasons_cleared | integer | no | default 0 |
progress | boolean | no | default false |
retry_after_seconds | integer or null | no | |
skipped | integer | no | default 0 |
skipped_kinds | object<integer> | no | |
test_runs_cleared | integer | yes | |
transcripts_deleted | integer | yes | |
webhook_bodies_dropped | integer | yes |
| Error | When |
|---|---|
401 | No account session was presented, or it is invalid or expired. |
403 | The account is suspended or its email is not verified. |
404 | The 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. |
422 | The 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.
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/stored-conversations/delete" \
-H "Authorization: Bearer $DVAARIK_TOKEN"GET /v2/projects#
List the projects on this account.
| Detail | Value |
|---|---|
| Door | Account session — Authorization: Bearer $DVAARIK_TOKEN |
| Operation | list_projects_v2_projects_get |
| Success | 200 ProjectInfo[] |
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
limit | query | integer | no | |
offset | query | integer | no |
ProjectInfo#
| Field | Type | Required | Notes |
|---|---|---|---|
api_rpm | integer | yes | |
created_at | date-time | yes | |
external_reference | string or null | yes | |
id | uuid | yes | |
is_default | boolean | yes | |
max_call_seconds | integer | yes | |
name | string | yes | |
revision | integer | yes | |
social_daily_sends | integer | yes | |
social_rpm | integer | yes | |
status | string | yes | |
updated_at | date-time | yes | |
voice_concurrency | integer | yes | |
zero_retention | boolean | no | default false |
| Error | When |
|---|---|
422 | The 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.
curl -sS -X GET "https://api.developers.dvaarik.com/v2/projects?limit=20" \
-H "Authorization: Bearer $DVAARIK_TOKEN"POST /v2/projects#
Create a project — the isolation boundary every other resource hangs off.
| Detail | Value |
|---|---|
| Door | Account session — Authorization: Bearer $DVAARIK_TOKEN |
| Operation | create_project_v2_projects_post |
| Success | 201 ProjectInfo |
Request body: CreateProjectRequest.
CreateProjectRequest#
| Field | Type | Required | Notes |
|---|---|---|---|
external_reference | string or null | no | |
name | string | yes |
| Error | When |
|---|---|
422 | The 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.
curl -sS -X POST "https://api.developers.dvaarik.com/v2/projects" \
-H "Authorization: Bearer $DVAARIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "production",
"external_reference": "acct_4821"
}'GET /v2/projects/{project_id}#
Read one project with its concurrency, request-rate and maximum-session limits.
| Detail | Value |
|---|---|
| Door | Account session — Authorization: Bearer $DVAARIK_TOKEN |
| Operation | get_project_v2_projects__project_id__get |
| Success | 200 ProjectInfo |
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
project_id | path | uuid | yes |
| Error | When |
|---|---|
422 | The 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.
curl -sS -X GET "https://api.developers.dvaarik.com/v2/projects/$PROJECT_ID" \
-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.