Developer platform · v2

API reference

View as MarkdownAll docs

Carriers and numbers

22 operations · all resources

What this covers#

Bring your own telephony account. Connect it with your carrier credentials, import or attach the numbers you own, and point each number at the URL the API hands back.

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 CONNECTION_ID="<uuid>"
export NUMBER_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: carrier:read, carrier: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/carriers#

List the project's carrier connections and their verification state.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:read
OperationlistCarriers
Success200 V2CarrierInfo[]
ParameterInTypeRequiredNotes
limitqueryintegerno
offsetqueryintegerno

V2CarrierInfo#

A carrier connection. No credential field exists in this direction.

FieldTypeRequiredNotes
created_atdate-timeyes
display_namestringyes
hintobjectyes
iduuidyes
last_errorstring or nullno
namestringyes
number_countintegernodefault 0
project_iduuidyes
providerstringyes
statusstringyes
updated_atdate-timeyes
verified_atdate-time 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/carriers?limit=20" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/carriers#

Connect a carrier account you already pay for. The credentials are checked against the carrier immediately and a rejected credential is never stored.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationcreateCarrier
Success201 V2CarrierInfo

Request body: V2CarrierCreate.

V2CarrierCreate#

FieldTypeRequiredNotes
credentialsobject<string>yes
namestringyesmin length 1; max length 120
providerstringyesmin length 1; max length 32
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/carriers" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "<credential field from the catalogue>": "<secret>"
    },
    "name": "Primary line",
    "provider": "<carrier id from the catalogue>"
  }'

DELETE /v2/carriers/{connection_id}#

Forget the carrier credentials and disable every number on the connection. Your carrier account is never touched.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationdisconnectCarrier
Success200 V2CarrierInfo
ParameterInTypeRequiredNotes
connection_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 DELETE "https://api.developers.dvaarik.com/v2/carriers/$CONNECTION_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

GET /v2/carriers/{connection_id}#

Read one carrier connection.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:read
OperationgetCarrier
Success200 V2CarrierInfo
ParameterInTypeRequiredNotes
connection_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/carriers/$CONNECTION_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/carriers/{connection_id}/numbers#

Attach one E.164 number by hand, for a carrier that cannot list its numbers.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationattachCarrierNumber
Success201 V2CarrierNumberInfo
ParameterInTypeRequiredNotes
connection_idpathuuidyes

Request body: V2CarrierNumberAttach.

V2CarrierNumberAttach#

Attach one E.164 the developer's own carrier account holds.

FieldTypeRequiredNotes
labelstring or nullno
phone_numberstringyesmin length 7; max length 24

V2CarrierNumberInfo#

FieldTypeRequiredNotes
answer_urlstringnodefault ""
connection_iduuidyes
created_atdate-timeyes
iduuidyes
inbound_agent_iduuid or nullno
inbound_enabledbooleanyes
labelstring or nullno
outbound_enabledbooleanyes
phone_numberstringyes
project_iduuidyes
providerstringyes
stream_urlstringnodefault ""
updated_atdate-timeyes
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/carriers/$CONNECTION_ID/numbers" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+15550000001",
    "label": "Main line"
  }'

POST /v2/carriers/{connection_id}/numbers/import#

Pull the numbers this carrier account already holds.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationimportCarrierNumbers
Success200 V2CarrierNumberImportResult
ParameterInTypeRequiredNotes
connection_idpathuuidyes

V2CarrierNumberImportResult#

FieldTypeRequiredNotes
addedintegeryes
numbersV2CarrierNumberInfo[]yes
updatedintegeryes
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/carriers/$CONNECTION_ID/numbers/import" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

POST /v2/carriers/{connection_id}/verify#

Re-check the stored credentials, or replace them when a body is sent — and only if the carrier accepts the replacement.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationverifyCarrier
Success200 V2CarrierInfo
ParameterInTypeRequiredNotes
connection_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/carriers/$CONNECTION_ID/verify" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

GET /v2/carriers/catalog#

The connectable carriers with the exact credential fields to render and, per carrier, whether it fetches an answer URL or takes a stream URL.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:read
OperationlistCarrierCatalog
Success200 V2CarrierCatalog

V2CarrierCatalog#

FieldTypeRequiredNotes
carriersV2CarrierCatalogEntry[]yes

V2CarrierCatalogEntry#

One connectable carrier: what to type, and what to configure back.

FieldTypeRequiredNotes
display_namestringyes
fieldsV2CarrierCredentialField[]yes
inbound_stylestringyes
inbound_url_patternstringyes
needsstringyesThe sentence shown above the connect form.
providerstringyes
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/carriers/catalog" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

GET /v2/carriers/numbers#

List the project's numbers with the exact answer or stream URL to paste into the carrier.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:read
OperationlistCarrierNumbers
Success200 V2CarrierNumberInfo[]
ParameterInTypeRequiredNotes
limitqueryintegerno
offsetqueryintegerno
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/carriers/numbers?limit=20" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

DELETE /v2/carriers/numbers/{number_id}#

Forget the number locally. The number itself stays yours at the carrier.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationdeleteCarrierNumber
Success204 no body
ParameterInTypeRequiredNotes
number_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 DELETE "https://api.developers.dvaarik.com/v2/carriers/numbers/$NUMBER_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"

PATCH /v2/carriers/numbers/{number_id}#

Bind an agent to the number, and switch inbound answering or outbound dialling on or off.

DetailValue
DoorProject API key — X-Api-Key: $DVAARIK_API_KEY
Scopecarrier:write
OperationupdateCarrierNumber
Success200 V2CarrierNumberInfo
ParameterInTypeRequiredNotes
number_idpathuuidyes

Request body: V2CarrierNumberUpdate.

V2CarrierNumberUpdate#

Every field optional; only what was SENT is applied. inbound_agent_id=null explicitly unbinds and switches inbound off, which is why the presence of the key matters and not just its value.

FieldTypeRequiredNotes
inbound_agent_iduuid or nullno
inbound_enabledboolean or nullno
labelstring or nullno
outbound_enabledboolean 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/carriers/numbers/$NUMBER_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_agent_id": "<agent uuid>",
    "inbound_enabled": true
  }'

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}/carriers#

List the project's carrier connections and their verification state.

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

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

Connect a carrier account you already pay for. The credentials are checked against the carrier immediately and a rejected credential is never stored.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleCreateCarrier
Success201 V2CarrierInfo
ParameterInTypeRequiredNotes
project_idpathuuidyes

Request body: V2CarrierCreate.

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/carriers" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "<credential field from the catalogue>": "<secret>"
    },
    "name": "Primary line",
    "provider": "<carrier id from the catalogue>"
  }'

DELETE /console/v2/projects/{project_id}/carriers/{connection_id}#

Forget the carrier credentials and disable every number on the connection. Your carrier account is never touched.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleDisconnectCarrier
Success200 V2CarrierInfo
ParameterInTypeRequiredNotes
connection_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/carriers/$CONNECTION_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/projects/{project_id}/carriers/{connection_id}#

Read one carrier connection.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleGetCarrier
Success200 V2CarrierInfo
ParameterInTypeRequiredNotes
connection_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/carriers/$CONNECTION_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/projects/{project_id}/carriers/{connection_id}/numbers#

Attach one E.164 number by hand, for a carrier that cannot list its numbers.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleAttachCarrierNumber
Success201 V2CarrierNumberInfo
ParameterInTypeRequiredNotes
connection_idpathuuidyes
project_idpathuuidyes

Request body: V2CarrierNumberAttach.

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/carriers/$CONNECTION_ID/numbers" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+15550000001",
    "label": "Main line"
  }'

POST /console/v2/projects/{project_id}/carriers/{connection_id}/numbers/import#

Pull the numbers this carrier account already holds.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleImportCarrierNumbers
Success200 V2CarrierNumberImportResult
ParameterInTypeRequiredNotes
connection_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/carriers/$CONNECTION_ID/numbers/import" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /console/v2/projects/{project_id}/carriers/{connection_id}/verify#

Re-check the stored credentials, or replace them when a body is sent — and only if the carrier accepts the replacement.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleVerifyCarrier
Success200 V2CarrierInfo
ParameterInTypeRequiredNotes
connection_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/carriers/$CONNECTION_ID/verify" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/projects/{project_id}/carriers/catalog#

The connectable carriers with the exact credential fields to render and, per carrier, whether it fetches an answer URL or takes a stream URL.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleListCarrierCatalog
Success200 V2CarrierCatalog
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/carriers/catalog" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

GET /console/v2/projects/{project_id}/carriers/numbers#

List the project's numbers with the exact answer or stream URL to paste into the carrier.

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

DELETE /console/v2/projects/{project_id}/carriers/numbers/{number_id}#

Forget the number locally. The number itself stays yours at the carrier.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleDeleteCarrierNumber
Success204 no body
ParameterInTypeRequiredNotes
number_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/carriers/numbers/$NUMBER_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

PATCH /console/v2/projects/{project_id}/carriers/numbers/{number_id}#

Bind an agent to the number, and switch inbound answering or outbound dialling on or off.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
OperationconsoleUpdateCarrierNumber
Success200 V2CarrierNumberInfo
ParameterInTypeRequiredNotes
number_idpathuuidyes
project_idpathuuidyes

Request body: V2CarrierNumberUpdate.

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/carriers/numbers/$NUMBER_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_agent_id": "<agent uuid>",
    "inbound_enabled": true
  }'

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.