Move a live phone call to another number
const url = 'https://api.pingram.io/voice/calls/example/transfer';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":"example","holdSay":"example","holdAudio":"example","receiverSay":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pingram.io/voice/calls/example/transfer \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": "example", "holdSay": "example", "holdAudio": "example", "receiverSay": "example" }'Authorizations
Parameters
Path Parameters
Call tracking id
Request Bodyrequired
Body for POST /voice/calls/{trackingId}/transfer.
object
E.164 number to move the caller to.
Spoken once to the caller while they wait. If holdAudio is also set, this sentence plays first and then the audio.
builtin:soft-piano, builtin:calm, builtin:bright, or an HTTPS MP3 or WAV. Loops until the call connects. Omit it and the caller hears ringing.
Spoken to the person who answers, before the caller is connected.
Examplegenerated
{ "to": "example", "holdSay": "example", "holdAudio": "example", "receiverSay": "example"}Responses
200
Successful response
object
Examplegenerated
{ "message": "example"}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}