Docs
GuidesAPI referenceWebhooksWeb widget

Calls

Start an outbound call

POST/calls

The call is placed straight away and returned with its id. Its summary, outcome and analysis arrive when it ends: fetch it again, or use the call.completed webhook. Needs a plan with minutes left.

#Request body

assistant_idintegerrequired
tostringrequired
The number to call, E.164 (+13125550142)
phone_number_idinteger
Your BluePenguin number to call from; default: your first one
variablesobject
Values for {{variables}} in the prompt and first message

#Example request

curl -X POST https://app.bluepenguin.io/api/v1/calls \
  -H "Authorization: Bearer $BLUEPENGUIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "assistant_id": 12,
  "to": "+15555550142",
  "phone_number_id": 3,
  "variables": {
    "first_name": "Maya"
  }
}'

#Example response

200 OK
{
  "id": 8812,
  "assistant_id": 12,
  "channel": "phone",
  "direction": "outbound",
  "from_number": "+15555550100",
  "to_number": "+15555550142",
  "started_at": null,
  "ended_at": null,
  "duration_s": 0,
  "status": "queued",
  "outcome": null,
  "ended_reason": null,
  "summary": "",
  "intent": "",
  "caller_name": null,
  "score": null,
  "analysis": {}
}

#Errors

StatusWhen
401Missing or invalid API key.
422A parameter or field is invalid; the reply lists which.
429More than 240 requests a minute on this key.