Skip to content

Place an outbound call. The config is not saved.

POST
/voice/call
curl --request POST \
--url https://api.pingram.io/voice/call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "to": "example", "config": { "type": "script", "steps": [ { "verb": "Say", "text": "example" } ], "voicemailAction": "hangup", "voicemailMessage": "example", "privacy": { "record": true, "transcribe": true } }, "variables": { "additionalProperty": "example" } }'

Authorizations

Request Bodyrequired

Media typeapplication/json
object
to
required

E.164 number to dial.

string
config
required
One of:
Script
object
type
required
string
Allowed values: script
steps
required
Array<object>

One spoken line. This slice only runs Say.

object
verb
required
string
Allowed values: Say
text
required
string
voicemailAction

What to do when an answering machine picks up. hangup ends the call, message plays voicemailMessage, continue keeps talking. Default: continue.

string
Allowed values: hangup message continue
voicemailMessage
string
privacy

Omitted privacy means record and transcribe are both on.

object
record
boolean
transcribe
boolean
variables

Optional per-call {{variable}} overrides.

object
key
additional properties
string

Responses

200

Successful response

Media typeapplication/json
object
trackingId
required

Stable tracking id — use with GET /voice/calls/{trackingId}.

string
websocket
required

Live transcript socket. The path id is the trackingId.

string
Examplegenerated
{
"trackingId": "example",
"websocket": "example"
}

400

Bad Request - validation errors, invalid input

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

401

Unauthorized

402

Payment Required - usage limits exceeded

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

500

Internal Server Error

502

Bad Gateway - provider error

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}