Skip to content

Hear your agent: one campaign-less call to a verified own number

POST
/v1/agents/{agent_id}/test-call
curl --request POST \
--url https://api.vocapable.com/v1/agents/example/test-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "to": "example", "timezone": "example", "jurisdictions": [ "example" ] }'
agent_id
required
Agent Id
string
Idempotency-Key
Any of:
string

Unique key for this request, so a retry replays the original result instead of repeating the work. Stored for 24 hours; a replayed response carries Idempotent-Replay: true. A UUID is the documented shape.

Media typeapplication/json
TestCallRequest

POST /v1/agents/{id}/test-call (docs/04-api.md §3).

to must be a currently verified VerifiedNumber of the calling tenant - the test-call precondition (CANON fact 120). The two optional gate facts exist because the platform holds no NPA geodata: when no live Contact already carries them, the body must supply the callee-local zone and jurisdictions or the gate fails closed (contact_timezone_unresolved / jurisdiction_unresolved).

object
to
required
To
string
timezone
Any of:
string
jurisdictions
Any of:
Array<string>
Examplegenerated
{
"to": "example",
"timezone": "example",
"jurisdictions": [
"example"
]
}

Successful Response

Media typeapplication/json
TestCall

A test call as the 202 answers it - the campaign-less ContactAttempt (att_…) IS the test-call resource, so its lifecycle is read from the attempt feed’s vocabulary.

telephony says which plane carried it: mock (a vcp_test_ key - synchronous full-pipeline dial, no PSTN) or platform (a live key - the attempt is scheduled and the origination loop sweeps it). call_id is written at teardown and is always null in the 202.

object
id
required
Id
string
agent_id
required
Agent Id
string
agent_version_id
required
Agent Version Id
string
to
required
To
string
contact_id
required
Contact Id
string
telephony
required
Telephony
string
Allowed values: mock platform
state
required
State
string
disposition
Any of:
string
call_id
Any of:
string
created_at
required
Created At
string format: date-time
Example
{
"telephony": "mock"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}