Developer platform · v2

API reference

View as MarkdownAll docs

API keys

3 operations · all resources

What this covers#

Project-scoped machine keys. The plaintext is returned once, at creation, and never again; a key carries an explicit scope set and cannot be widened after the fact.

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

GET /v2/api-keys#

List the project's keys: prefix, scopes and usage timestamps, never the plaintext.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
Operationlist_v2_keys_v2_api_keys_get
Success200 ApiKeyInfo[]
ParameterInTypeRequiredNotes
project_idqueryuuid or nullno
limitqueryintegerno
offsetqueryintegerno
include_revokedquerybooleanno

ApiKeyInfo#

FieldTypeRequiredNotes
created_atdate-timeyes
iduuidyes
key_prefixstringyes
last_used_atdate-time or nullyes
namestringyes
project_iduuid or nullyes
revoked_atdate-time or nullyes
scopesstring[]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 GET "https://api.developers.dvaarik.com/v2/api-keys?limit=20" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"

POST /v2/api-keys#

Mint a project key with an explicit scope set. This is the only response that ever carries the plaintext.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
Operationcreate_v2_key_v2_api_keys_post
Success201 CreatedKeyResponse

Request body: CreateV2KeyRequest.

CreateV2KeyRequest#

Canonical v2 create with a required, explicit permission set.

FieldTypeRequiredNotes
namestringyes
project_iduuidyes
scopesstring[]yesmin 1 item(s); max 32 item(s)

CreatedKeyResponse#

The ONLY response that ever carries the plaintext.

FieldTypeRequiredNotes
keyApiKeyInfoyes
plaintextstringyes
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/api-keys" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "backend-server",
    "project_id": "<project uuid>",
    "scopes": [
      "voice:read",
      "voice:write"
    ]
  }'

DELETE /v2/api-keys/{key_id}#

Revoke a key immediately. Revocation cannot be undone; mint a replacement first if the key is live.

DetailValue
DoorAccount session — Authorization: Bearer $DVAARIK_TOKEN
Operationrevoke_v2_key_v2_api_keys__key_id__delete
Success200 ApiKeyInfo
ParameterInTypeRequiredNotes
key_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 DELETE "https://api.developers.dvaarik.com/v2/api-keys/$KEY_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.