POST
/
dial
/
scheduled
curl --request POST \
  --url https://app.happyrobot.ai/api/v1/dial/scheduled \
  --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>",
  "csv_file": "<string>",
  "calls": [
    [
      {
        "phone_number": "+1234567890",
        "scheduled_date": "2024-01-01",
        "scheduled_time": "01:01:01",
        "timezone": "UTC",
        "max_duration_mins": 10,
        "first_name": "John (This is a use-case param)",
        "last_name": "Doe (This is a use-case param)",
        "company_name": "Acme Corp (This is a use-case param)"
      }
    ]
  ],
  "staggered_interval_minutes": 123,
  "campaign_name": "<string>",
  "retry_logic": [
    {
      "query": "<string>",
      "retry_period": 123,
      "max_retry_per_day": 123
    }
  ],
  "language": "en-US",
  "max_duration_mins": 123,
  "max_retries": 123
}'
{
  "createdCalls": [
    {
      "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
Body
number_id
string
required

ID of the phone number that should trigger the call.

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 output 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.

model_id
string

ID of the model that should handle the call.

csv_file
string

Base64 encoded CSV file with phone numbers to call (for backward compatibility).

calls
object[]

Array of calls to schedule.

Array of calls to schedule. Use-case params must be included as properties on the call object.

staggered_interval_minutes
integer

Specifies the interval (in minutes) between each call in the campaign. This setting will be overridden if individual calls have a scheduled_date specified.

campaign_name
string

Name of the campaign.

retry_logic
object[]

Retry logic for the campaign.

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
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.

max_retries
number

Max retries for each call.

Response

200
application/json
200
createdCalls
object[]
required