Developer platform · v2

API reference

View as MarkdownAll docs

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:

bash
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.

StatusCause
401Missing API key or Invalid API key — the X-Api-Key header is absent, unknown, or revoked.
403API key is not scoped to a project, Project unavailable, or API key is missing the required scope '<scope>'.
429The 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#

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 — 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.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopeproject:read
OperationgetProjectRetention
Success200 ProjectRetentionInfo

ProjectRetentionInfo#

The project's zero-retention switch, its history and what is kept.

FieldTypeRequiredNotes
changed_atdate-time or nullno
changed_byRetentionChangedBy or nullno
changesRetentionChange[]no
project_iduuidyes
what_is_keptstringyes
zero_retentionbooleanyesZero 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.

FieldTypeRequiredNotes
atdate-timeyes
doorstring or nullno
emailstring or nullno
user_idstring or nullno
zero_retentionbooleanyes

RetentionChangedBy#

FieldTypeRequiredNotes
doorstring or nullno
emailstring or nullno
user_idstring or nullno
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 machine-door errors above. Full list on the errors page.

bash
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.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetProjectRetention
Success200 ProjectRetentionInfo
ParameterInTypeRequiredNotes
project_idpathuuidyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
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/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.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleSetProjectRetention
Success200 ProjectRetentionInfo
ParameterInTypeRequiredNotes
project_idpathuuidyes

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.

FieldTypeRequiredNotes
confirm_turn_offbooleannodefault false
zero_retentionbooleanyes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
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.
409The project or resource is in a state that refuses this change.
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 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.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleDeleteStoredConversations
Success200 StoredConversationsDeleted
ParameterInTypeRequiredNotes
project_idpathuuidyes

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).

FieldTypeRequiredNotes
archived_recordings_scheduledintegeryes
calls_clearedintegeryes
chat_conversations_deletedintegeryes
chat_messages_deletedintegeryes
donebooleanyes
handoff_reasons_clearedintegernodefault 0
progressbooleannodefault false
retry_after_secondsinteger or nullno
skippedintegernodefault 0
skipped_kindsobject<integer>no
test_runs_clearedintegeryes
transcripts_deletedintegeryes
webhook_bodies_droppedintegeryes
ErrorWhen
401No account session was presented, or it is invalid or expired.
403The account is suspended or its email is not verified.
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 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.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
Operationlist_projects_v2_projects_get
Success200 ProjectInfo[]
ParameterInTypeRequiredNotes
limitqueryintegerno
offsetqueryintegerno

ProjectInfo#

FieldTypeRequiredNotes
api_rpmintegeryes
created_atdate-timeyes
external_referencestring or nullyes
iduuidyes
is_defaultbooleanyes
max_call_secondsintegeryes
namestringyes
revisionintegeryes
social_daily_sendsintegeryes
social_rpmintegeryes
statusstringyes
updated_atdate-timeyes
voice_concurrencyintegeryes
zero_retentionbooleannodefault false
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 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.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
Operationcreate_project_v2_projects_post
Success201 ProjectInfo

Request body: CreateProjectRequest.

CreateProjectRequest#

FieldTypeRequiredNotes
external_referencestring or nullno
namestringyes
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/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.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
Operationget_project_v2_projects__project_id__get
Success200 ProjectInfo
ParameterInTypeRequiredNotes
project_idpathuuidyes
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 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.