Developer platform · v2

API reference

View as MarkdownAll docs

Agents API

12 operations · all resources

What this covers#

An agent is the frozen configuration a call runs against: pipeline, prompt, language, limits and webhook. Sessions record the agent version they ran, so editing an agent never rewrites history.

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 AGENT_ID="<uuid>"
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: voice:read, voice:write. 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/agents#

List the project's agents.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
Operationlist_agents_v2_agents_get
Success200 V2AgentInfo[]
ParameterInTypeRequiredNotes
limitqueryintegerno
offsetqueryintegerno
include_inactivequerybooleanno

V2AgentInfo#

FieldTypeRequiredNotes
ambience_levelinteger or nullyes
ambience_soundstring or nullyes
backchannelbooleanyes
can_send_dtmfbooleanyes
created_atdate-timeyes
dead_air_secondsinteger or nullyes
display_namestring or nullyes
greetingstring or nullyes
has_webhook_secretbooleannodefault false
iduuidyes
idle_hangup_secondsinteger or nullyes
idle_warn_secondsinteger or nullyes
insight_configInsightConfigBody or nullno
is_activebooleanyes
languagestringyes
max_chars_per_mininteger or nullyes
max_duration_secondsinteger or nullyes
namestringyes
pipeline_configobjectyes
pipeline_modestringyes
project_iduuidyes
promptstringyes
record_callsbooleanyes
retention_daysinteger or nullyes
store_transcriptbooleanyes
tool_webhook_urlstring or nullyes
toolsany[]yes
updated_atdate-timeyes
variablesany[]yes
versionintegeryes
webhook_include_recording_urlbooleanyes
webhook_include_transcriptbooleanyes
webhook_urlstring or nullyes
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/agents?limit=20" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/agents#

Create an agent. The response carries its webhook signing secret once.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
Operationcreate_agent_v2_agents_post
Success201 V2CreatedAgentResponse

Request body: V2AgentCreate.

V2AgentCreate#

FieldTypeRequiredNotes
ambience_levelinteger or nullno
ambience_soundstring or nullno
backchannelbooleannodefault true
can_send_dtmfbooleannodefault false
dead_air_secondsinteger or nullno
display_namestring or nullno
greetingstring or nullno
idle_hangup_secondsinteger or nullno
idle_warn_secondsinteger or nullno
insight_configInsightConfigBody or nullno
languagestringnodefault "en-IN"
max_chars_per_mininteger or nullno
max_duration_secondsinteger or nullno
namestringyes
pipeline_configobjectyes
pipeline_modestringyes
promptstringyes
record_callsbooleannodefault false
retention_daysinteger or nullno
store_transcriptbooleannodefault false
tool_webhook_urlstring or nullno
toolsobject[]no
variablesobject[]no
webhook_include_recording_urlbooleannodefault false
webhook_include_transcriptbooleannodefault false
webhook_urlstring or nullno

V2CreatedAgentResponse#

FieldTypeRequiredNotes
agentV2AgentInfoyes
webhook_secretstringyes
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 POST "https://api.developers.dvaarik.com/v2/agents" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "support",
    "pipeline_config": {
      "stt": {
        "account_id": "<provider account uuid>",
        "model": "<model id from the catalogue>"
      },
      "llm": {
        "account_id": "<provider account uuid>",
        "model": "<model id from the catalogue>"
      },
      "tts": {
        "account_id": "<provider account uuid>",
        "model": "<model id from the catalogue>",
        "voice": "<provider voice id>"
      }
    },
    "pipeline_mode": "cascade",
    "prompt": "You are the receptionist for {{company}}. Answer questions and book visits.",
    "greeting": "Hello, this is support.",
    "language": "en-IN"
  }'

DELETE /v2/agents/{agent_id}#

Deactivate the agent. Past sessions keep the agent id and version they ran; numbers bound to it stop answering.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
Operationdelete_agent_v2_agents__agent_id__delete
Success200 V2AgentDeleted
ParameterInTypeRequiredNotes
agent_idpathuuidyes

V2AgentDeleted#

FieldTypeRequiredNotes
callsintegeryes
deletedbooleanyes
iduuidyes
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 machine-door errors above. Full list on the errors page.

bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/v2/agents/$AGENT_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

GET /v2/agents/{agent_id}#

Read one agent, including the pipeline it will run.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:read
Operationget_agent_v2_agents__agent_id__get
Success200 V2AgentInfo
ParameterInTypeRequiredNotes
agent_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 machine-door errors above. Full list on the errors page.

bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/agents/$AGENT_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

PATCH /v2/agents/{agent_id}#

Update an agent. Only the fields you send change, and the version increments.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
Operationupdate_agent_v2_agents__agent_id__patch
Success200 V2AgentInfo
ParameterInTypeRequiredNotes
agent_idpathuuidyes

Request body: V2AgentUpdate.

V2AgentUpdate#

FieldTypeRequiredNotes
ambience_levelinteger or nullno
ambience_soundstring or nullno
backchannelboolean or nullno
can_send_dtmfboolean or nullno
dead_air_secondsinteger or nullno
display_namestring or nullno
greetingstring or nullno
idle_hangup_secondsinteger or nullno
idle_warn_secondsinteger or nullno
insight_configInsightConfigBody or nullno
is_activeboolean or nullno
languagestring or nullno
max_chars_per_mininteger or nullno
max_duration_secondsinteger or nullno
namestring or nullno
pipeline_configobject or nullno
pipeline_modestring or nullno
promptstring or nullno
record_callsboolean or nullno
retention_daysinteger or nullno
store_transcriptboolean or nullno
tool_webhook_urlstring or nullno
toolsobject[] or nullno
variablesobject[] or nullno
webhook_include_recording_urlboolean or nullno
webhook_include_transcriptboolean or nullno
webhook_urlstring 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 PATCH "https://api.developers.dvaarik.com/v2/agents/$AGENT_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "greeting": "Hello, this is support. How can I help?",
    "is_active": true
  }'

POST /v2/agents/{agent_id}/rotate-secret#

Issue a new webhook signing secret for this agent and return it once.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopevoice:write
Operationrotate_secret_v2_agents__agent_id__rotate_secret_post
Success200 V2CreatedAgentResponse
ParameterInTypeRequiredNotes
agent_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 machine-door errors above. Full list on the errors page.

bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/agents/$AGENT_ID/rotate-secret" \
  -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}/agents#

List the project's agents.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListAgents
Success200 V2AgentInfo[]
ParameterInTypeRequiredNotes
project_idpathuuidyes
limitqueryintegerno
offsetqueryintegerno
include_inactivequerybooleanno
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/agents?limit=20" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/projects/{project_id}/agents#

Create an agent. The response carries its webhook signing secret once.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleCreateAgent
Success201 V2CreatedAgentResponse
ParameterInTypeRequiredNotes
project_idpathuuidyes

Request body: V2AgentCreate.

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 POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/agents" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "support",
    "pipeline_config": {
      "stt": {
        "account_id": "<provider account uuid>",
        "model": "<model id from the catalogue>"
      },
      "llm": {
        "account_id": "<provider account uuid>",
        "model": "<model id from the catalogue>"
      },
      "tts": {
        "account_id": "<provider account uuid>",
        "model": "<model id from the catalogue>",
        "voice": "<provider voice id>"
      }
    },
    "pipeline_mode": "cascade",
    "prompt": "You are the receptionist for {{company}}. Answer questions and book visits.",
    "greeting": "Hello, this is support.",
    "language": "en-IN"
  }'

DELETE /console/v2/projects/{project_id}/agents/{agent_id}#

Deactivate the agent. Past sessions keep the agent id and version they ran; numbers bound to it stop answering.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleDeleteAgent
Success200 V2AgentDeleted
ParameterInTypeRequiredNotes
agent_idpathuuidyes
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.
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 DELETE "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/agents/$AGENT_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/projects/{project_id}/agents/{agent_id}#

Read one agent, including the pipeline it will run.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetAgent
Success200 V2AgentInfo
ParameterInTypeRequiredNotes
agent_idpathuuidyes
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/agents/$AGENT_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

PATCH /console/v2/projects/{project_id}/agents/{agent_id}#

Update an agent. Only the fields you send change, and the version increments.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleUpdateAgent
Success200 V2AgentInfo
ParameterInTypeRequiredNotes
agent_idpathuuidyes
project_idpathuuidyes

Request body: V2AgentUpdate.

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 PATCH "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/agents/$AGENT_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "greeting": "Hello, this is support. How can I help?",
    "is_active": true
  }'

POST /console/v2/projects/{project_id}/agents/{agent_id}/rotate-secret#

Issue a new webhook signing secret for this agent and return it once.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleRotateAgentSecret
Success200 V2CreatedAgentResponse
ParameterInTypeRequiredNotes
agent_idpathuuidyes
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.
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 POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/agents/$AGENT_ID/rotate-secret" \
  -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.