API reference / Omnichannel

Omnichannel

The Omnichannel endpoints of the Voiceland AI API, with parameters, schemas and curl examples.

Last updated:

GET /v1/channel-kinds#

List channel kinds. The channel types you can configure.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl "https://api.voiceland.ai/v1/channel-kinds" \
  -H "Authorization: Bearer VL_API_KEY"

Example response

{
  "kinds": [
    "http",
    "slack",
    "telegram",
    "discord"
  ]
}

GET /v1/channels#

List channels. Your configured delivery channels.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl "https://api.voiceland.ai/v1/channels" \
  -H "Authorization: Bearer VL_API_KEY"

Example response

{
  "channels": []
}

DELETE /v1/channels/{name}#

Delete a channel. Deletes a channel.

Parameters

Name In Type Required Description
name path string Yes Channel name.

Responses

Code Description
204 Deleted.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X DELETE "https://api.voiceland.ai/v1/channels/{name}" \
  -H "Authorization: Bearer VL_API_KEY"

GET /v1/channels/{name}#

Get a channel. Returns one channel by name.

Parameters

Name In Type Required Description
name path string Yes Channel name.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl "https://api.voiceland.ai/v1/channels/{name}" \
  -H "Authorization: Bearer VL_API_KEY"

PUT /v1/channels/{name}#

Create or update a channel. Configures a delivery channel (webhook, chat platform, …).

Parameters

Name In Type Required Description
name path string Yes Channel name.

Request body

application/json Schema: ChannelPutRequest

Field Type Required Description
chat_id string
endpoint string Delivery endpoint (e.g. a webhook URL).
headers map of string
kind string Yes Channel type (see /channel-kinds).
label string Human-readable label.
signing_key string
token string

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X PUT "https://api.voiceland.ai/v1/channels/{name}" \
  -H "Authorization: Bearer VL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "endpoint": "https://example.com/hook",
  "kind": "http",
  "label": "Ops"
}'

POST /v1/channels/{name}/test#

Test a channel. Sends a test delivery to the channel and returns the attempt result.

Parameters

Name In Type Required Description
name path string Yes Channel name.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X POST "https://api.voiceland.ai/v1/channels/{name}/test" \
  -H "Authorization: Bearer VL_API_KEY"

Example response

{
  "channel": "ops-webhook",
  "http_status": 200
}

GET /v1/subscriptions#

List subscriptions. Your omnichannel event-routing rules.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl "https://api.voiceland.ai/v1/subscriptions" \
  -H "Authorization: Bearer VL_API_KEY"

Example response

{
  "subscriptions": []
}

DELETE /v1/subscriptions/{name}#

Delete a subscription. Deletes a subscription.

Parameters

Name In Type Required Description
name path string Yes Subscription name.

Responses

Code Description
204 Deleted.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X DELETE "https://api.voiceland.ai/v1/subscriptions/{name}" \
  -H "Authorization: Bearer VL_API_KEY"

PUT /v1/subscriptions/{name}#

Create or update a subscription. Routes selected events to one or more channels, with an optional filter/schedule. A live subscription (no schedule, enabled) over call events is the real-time event webhooks capability; digests, disabled subscriptions, and live subscriptions that list only account alerts (kpi.*, calls.dial_cap_approaching, eval.drift_regression, report.ai_operations) or the chat takeover family (chat.takeover_*) are accepted on every plan.

Parameters

Name In Type Required Description
name path string Yes Subscription name.

Request body

application/json Schema: SubscriptionPutRequest

Field Type Required Description
actions array of SubscriptionAction
channels array of string Yes Channel names that receive the events.
enabled boolean Whether the subscription is active.
event_types array of string Event types to route (e.g. call.hangup). Empty means all.
filter SubscriptionFilter
schedule string

Responses

Code Description
200 Success.
401 Missing or invalid API key.
402 A live, enabled subscription over call events needs real-time event webhooks (feature_not_entitled), or the account has no subscription (no_subscription). Disabling the subscription (enabled: false) is always accepted.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X PUT "https://api.voiceland.ai/v1/subscriptions/{name}" \
  -H "Authorization: Bearer VL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "channels": [
    "ops-webhook"
  ],
  "enabled": true,
  "event_types": [
    "call.hangup"
  ]
}'

GET /v1/text-agents#

List text agents. Your chat-only agents.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl "https://api.voiceland.ai/v1/text-agents" \
  -H "Authorization: Bearer VL_API_KEY"

Example response

{
  "text_agents": []
}

DELETE /v1/text-agents/{name}#

Delete a text agent. Deletes a text agent.

Parameters

Name In Type Required Description
name path string Yes Text agent name.

Responses

Code Description
204 Deleted.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X DELETE "https://api.voiceland.ai/v1/text-agents/{name}" \
  -H "Authorization: Bearer VL_API_KEY"

GET /v1/text-agents/{name}#

Get a text agent. Returns one text agent by name.

Parameters

Name In Type Required Description
name path string Yes Text agent name.

Responses

Code Description
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl "https://api.voiceland.ai/v1/text-agents/{name}" \
  -H "Authorization: Bearer VL_API_KEY"

PUT /v1/text-agents/{name}#

Create or update a text agent. Configures a chat-only agent.

Parameters

Name In Type Required Description
name path string Yes Text agent name.

Request body

application/json Schema: TextAgent

Field Type Required Description
allowed_channels array of string
greeting string
history_messages integer
max_output_tokens integer
model string
name string Yes
provider string
system_prompt string Yes
temperature number

Responses

Code Description
200 Success.
401 Missing or invalid API key.
409 Creating this text agent would exceed your plan's agent allowance, one pool shared by voice and text agents, counted across your whole account (agent_limit). Updating an existing text agent is never refused for this reason.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Example request

curl -X PUT "https://api.voiceland.ai/v1/text-agents/{name}" \
  -H "Authorization: Bearer VL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "greeting": "Hi! How can I help?",
  "name": "support-chat",
  "system_prompt": "You are Acme'\''s helpful support assistant. Answer questions about orders and shipping."
}'

Schemas#

ChannelPutRequest#

Configure a delivery channel.

Field Type Required Description
chat_id string
endpoint string Delivery endpoint (e.g. a webhook URL).
headers map of string
kind string Yes Channel type (see /channel-kinds).
label string Human-readable label.
signing_key string
token string

Error#

Error envelope returned for non-2xx responses.

Field Type Required Description
error object Yes

SubscriptionAction#

Field Type Required Description
id string Yes
label string Yes
style string

SubscriptionFilter#

Field Type Required Description
hangup_causes array of string

SubscriptionPutRequest#

Route events to channels.

Field Type Required Description
actions array of SubscriptionAction
channels array of string Yes Channel names that receive the events.
enabled boolean Whether the subscription is active.
event_types array of string Event types to route (e.g. call.hangup). Empty means all.
filter SubscriptionFilter
schedule string

TextAgent#

A chat-only (text) agent.

Field Type Required Description
allowed_channels array of string
greeting string
history_messages integer
max_output_tokens integer
model string
name string Yes
provider string
system_prompt string Yes
temperature number

The console

These pages are read only. The test call, the API keys and the live API reference are in the console, where your account is signed in.

Open the console