POST
/
dial
/
outbound-batched
curl --request POST \
  --url https://app.happyrobot.ai/api/v1/dial/outbound-batched \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '[
  {
    "assistant_id": "<string>",
    "voice_id": "<string>",
    "model": "Fast",
    "number_id": "<string>",
    "prompt_id": "<string>",
    "use_case_id": "<string>",
    "agent_id": "<string>",
    "model_id": "<string>",
    "phone_number": "+1234567890",
    "language": "en-US",
    "params": "<any>",
    "metadata": {},
    "campaign_id": "<string>",
    "scheduled_for": "2024-01-01T01:01:01Z",
    "max_duration_mins": 123
  }
]'
[
  {
    "id": "<string>",
    "organization_id": "<string>",
    "metadata": {
      "call_sid": "<string>",
      "from": "+1234567890",
      "to": "+1234567890",
      "recording_sid": "<string>",
      "tags": [
        "<string>"
      ],
      "custom": {
        "clientId": "123",
        "orderId": "456"
      }
    },
    "use_case": {
      "id": "<string>",
      "organization_id": "<string>",
      "name": "Kate",
      "transfer_number": "<string>",
      "extract_with_ai": [
        {
          "name": "<string>",
          "description": "<string>",
          "type": "string",
          "example": "<string>",
          "required": true
        }
      ],
      "classification_tags": [
        {
          "name": "<string>",
          "description": "<string>"
        }
      ],
      "language": "en-US",
      "detailed_work_hours": {},
      "work_start": "<string>",
      "work_end": "<string>",
      "timezone": "<string>",
      "generic_after_hours_message": "<string>",
      "enable_detailed_work_hours": true,
      "keywords": [
        "<string>"
      ],
      "hooks": [
        {
          "url": "<string>",
          "headers": [
            {
              "key": "<string>",
              "value": "<string>"
            }
          ]
        }
      ],
      "params": {},
      "amd": true,
      "amd_behavior": "Hangup",
      "amd_messages": {},
      "sample_labels": [
        {
          "name": "<string>",
          "color": "slate"
        }
      ],
      "hidden": true,
      "evaluation_models": [
        "<string>"
      ],
      "max_duration_mins": 123,
      "recorded_message_inbound": true,
      "recorded_message_outbound": true,
      "show_original_caller_id": true,
      "disable_end_call_after_n_reminders": true,
      "model": "<string>"
    },
    "params": {},
    "created": "2024-01-01T01:01:01Z"
  }
]

Headers

authorization
string
required

Your API key for authentication. Use Bearer format.

Example:

"Bearer API_KEY"

Body

application/json · object[]
Body
number_id
string
required

ID of the phone number that should trigger the call.

Required string length: 24
phone_number
string
required

Phone number to call.

Example:

"+1234567890"

assistant_id
string
deprecated

DEPRECATED: Use the use_case_id instead.

voice_id
string
deprecated

DEPRECATED: ID of the voice that the agent will use.

model
string
deprecated

DEPRECATED: Model to use for the call

Example:

"Fast"

prompt_id
string

ID of the prompt to use for the call. If empty, default outbound prompt will be used.

use_case_id
string

ID of the use case that should handle the call.

Required string length: 24
agent_id
string

ID of the agent that should handle the call.

Required string length: 24
model_id
string

ID of the model that should handle the call.

Required string length: 24
language
enum<string>

Language of the call. It will default to use case's default language.

Available options:
en-US,
en-GB,
es-MX,
es-ES,
es-CO,
pt-PT,
de-DE,
fr-FR,
pl-PL,
ro-RO,
it-IT,
zh-CN,
hi-IN,
ja-JP,
sv-SE
params
any | null

Dynamic parameters to inject into the templated use case prompt.

metadata
object

Custom metadata associated with the call.

campaign_id
string

ID of the campaign that triggered the call.

scheduled_for
string

ISO 8601 UTC datetime the call is scheduled for. If not specified, the call will the executed immediately.

Example:

"2024-01-01T01:01:01Z"

max_duration_mins
integer

Specifies the maximum duration of the call in minutes. This value takes precedence over the maximum duration specified in the use-case model. If neither is provided, the default duration is 10 minutes.

Response

200
application/json
200
id
string
required

Unique identifier for the call.

organization_id
string
required

Organization ID.

metadata
object
required

Call metadata.

use_case
object
required

Use case that handled the call.

created
string
required

Date the call was created.

Example:

"2024-01-01T01:01:01Z"

params
object

Dynamic parameters to inject into the templated use case prompt.