← API reference

Leads API

Inbound lead webhook ingestion for external automations (Zapier/Make/n8n) that queues an outbound AI call.

POST /leads/inbound

Ingest an inbound lead

Auth: API key (Authorization: Bearer). Scope: leads:inbound.

Receives a lead from an external automation, E.164- and DNC-screens the destination, inserts a queued call job, and dispatches a lead.received trigger. DNC-listed destinations are rejected up front (403). If DNC verification is unavailable the request fails closed with 500 internal_error (no job queued). Supports the Idempotency-Key (or X-Idempotency-Key) header — replays within 24h return the original job with idempotent: true (HTTP 200).

Requires the leads:inbound scope.

Parameters

NameInTypeDescription
Idempotency-Keyheaderstring

Idempotency key (also accepted as X-Idempotency-Key); replays within 24h return the original result.

Request body application/json required

FieldTypeDescription
phonestring required

Destination in E.164 format.

pattern ^\+[1-9]\d{6,14}$

agent_idinteger required

Active, deployed agent with a configured bot.

namestring
sourcestring
issuestring
prioritystring

One of: low, normal, high, urgent · Default normal

custom_fieldsobject

Arbitrary key/values forwarded as call attributes (keys sanitized, max 50 chars each).

Accepts any keys; each value is string

scheduled_timestring

When to place the call; parsed in time_zone. Defaults to immediate.

time_zonestring

Default UTC

callback_urlstring (uri)

Optional result callback; SSRF-validated.

callback_secretstring

Shared secret used to HMAC-sign the result callback. Supplied PER REQUEST — it is not stored on your account, so it must be sent on every call. If callback_url is set and this is omitted, the callback is delivered UNSIGNED and the response carries a meta.warnings entry; an endpoint that verifies signatures will reject it and the result is lost once retries are exhausted.

max length 256

max_attemptsinteger

Default 3 · min 1 · max 10

Responses

202 Lead queued (new). A call job was created and a lead.received trigger dispatched.

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.call_idstring
data.statusstring

Always pending

data.agent_idinteger
data.agent_namestring
data.destination_phonestring
data.scheduled_atstring (date-time)
metaobject

Present only when there is a warning.

meta.warningsarray of string

Human-readable warnings. Currently one case: callback_url was sent without callback_secret, so the result callback will be sent unsigned.

200 Idempotent replay — a prior request with the same Idempotency-Key already created this job.

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.call_idstring
data.statusstring
data.idempotentboolean

Always true

400 Invalid request (validation errors under error.details.validation_errors).

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

500 The do-not-call check could not be completed (internal_error). The request fails closed: nothing was queued. Retry later.

Ready to build on Vosy?

API access is included with the Business and Enterprise plans. Sign up, choose a plan with API access, and create your own keys from the Vosy API page in your account. Compare plans

Get Started