Skip to main content
POST
/
voice
/
{thread_id}
/
phone-call
Create Phone Call In Thread
curl --request POST \
  --url https://api.puppeteerai.com/voice/{thread_id}/phone-call \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "callee": "<string>",
  "project_id": "<string>",
  "scheduled_for": "2023-11-07T05:31:56Z",
  "verification_code": "<string>",
  "swing_appointment_opening_id": "<string>"
}
'
{
  "id": "<string>",
  "call_type": "<string>",
  "status": "<string>",
  "to_number": "<string>",
  "from_number": "<string>",
  "scheduled_for": "<string>",
  "start_timestamp": 123,
  "end_timestamp": 123,
  "duration_ms": 123
}

Headers

Authorization
string
required

Path Parameters

thread_id
string
required

Body

application/json
callee
string
required

The phone number to call. Ideally in E.164 format, otherwise parsed as a number containing a country code.

project_id
string
required

The UUID of the Puppeteer project.

scheduled_for
string<date-time> | null

ISO 8601 datetime to schedule the call for a future time. If omitted, the call starts immediately.

verification_code
string | null

Verification code from Twilio Verify

swing_appointment_opening_id
string | null

Swing appointment opening ID

Response

Successful Response

id
string
required

Unique identifier for the call.

call_type
string
required

Type of call (e.g., "phone_call", "web_call").

status
string
required

Current status of the call (e.g., "queued", "ongoing", "ended", "scheduled").

to_number
string | null

The phone number being called (phone calls only).

from_number
string | null

The originating phone number (phone calls only).

scheduled_for
string | null

ISO 8601 datetime if the call is scheduled.

start_timestamp
integer | null

Unix timestamp when the call started.

end_timestamp
integer | null

Unix timestamp when the call ended.

duration_ms
integer | null

Duration of the call in milliseconds.