Calls
- GETGet Calls
- GETGet Call
- GETGet Transcript
- GETGet current page
- GETList Call tags
- GETReturn a pre-signed URL to the call recording
- GETReturn the logs for a call
- GETGets an organization's usage
- POSTStop Call
- POSTCancel Call
- POSTAdd a note to a call
- POSTTrigger async export of calls CSV to requester email
- PATCHUpdate a note on a call
- PATCHSet call as viewed by the user making the request
- PATCHSet call rating
- DELDelete a note from a call
- DELDelete a call
Dial
Orgs
Numbers
Usecases
Agents
Create Scheduled Outbound Call
Create a scheduled outbound call and have an AI answer questions for you.
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
Your API key for authentication. Use Bearer format.
"Bearer API_KEY"
Body
ID of the phone number that should trigger the call.
DEPRECATED: Use the use_case_id instead.
DEPRECATED: ID of the voice that the agent will use.
DEPRECATED: Model to use for the call
"Fast"
ID of the prompt to use for the call. If empty, default output prompt will be used.
ID of the use case that should handle the call.
24
ID of the agent that should handle the call.
ID of the model that should handle the call.
Base64 encoded CSV file with phone numbers to call (for backward compatibility).
Specifies the interval (in minutes) between each call in the campaign. This setting will be overridden if individual calls have a scheduled_date specified.
Name of the campaign.
Language of the call. It will default to use case's default language.
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
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 for each call.
Response
Unique identifier for the call.
Organization ID.
Call metadata.
Call SID from the provider.
Phone number that initiated the call.
"+1234567890"
Phone number that received the call.
"+1234567890"
Recording SID from the provider.
Tags associated with the call.
Use case that handled the call.
ID of the use case.
ID of the organization that owns the use case.
Model name.
Name of the use case.
"Kate"
Fallback phone number to transfer the call to if something breaks.
Parameters to extract with AI.
2 - 55
10 - 2000
string
, number
, boolean
, array
Classification tags for the use case.
Preferred language for the use case.
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
Detailed work hours for each day of the week.
Start of the work hours.
End of the work hours.
Bypass happyrobot and transfer calls directly to the transfer number.
Phone number to transfer the call to if bypass is true.
Message to play if the call is after hours.
Start of the work hours.
End of the work hours.
Timezone of the use case.
Generic message to play if the call is after hours.
Enable detailed work hours in the UI.
Keywords you want the transcriber to know about.
Webhooks to call when the use case is executed.
Parameters to pass to the use case.
Enable automatic machine detection. This is a prerequisite to end calls on machines or for Phone Tree Navigation.
AI assistant behavior when AMD is enabled. Continue
is used for Phone Tree Navigation, Hangup
to end the call and Message
to leave a message. If amd
is set, this field is required.
Hangup
, Continue
, Message
Record of messages to leave on voicemail if amd_behavior
is set to Message
. You may use parameters as you do in the prompt for templating. The key is the language of the message and the value is the message.
Message to leave on voicemail if amd_behavior
is set to Message
. You may use parameters as you do in the prompt for templating.
1
Available labels for the samples.
Name of the label.
1
Color of the label.
slate
, gray
, zinc
, neutral
, stone
, red
, orange
, amber
, yellow
, lime
, green
, teal
, cyan
, sky
, blue
, indigo
, violet
, purple
, fuchsia
, pink
, rose
Hide the use case from the UI.
Models the use case is evaluated on.
Specifies the maximum duration in minutes for this use-case. This value is overridden by the maximum duration specified for individual calls. If neither is provided, the default duration is 10 minutes.
Play 'This call is being recorded' message for inbound calls.
Play 'This call is being recorded' message for outbound calls.
Show the original caller ID on the call screen.
Disable end call after N reminders.
Date the call was created.
"2024-01-01T01:01:01Z"
Was this page helpful?
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"
}
]
}