Creates a new task for making calls or sending WhatsApp templates. Supports automatic contact lookup/creation by phone or email. See examples below for both types.
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Request body varies by task type. See examples for 'make_call' and 'send_message' (WhatsApp template).
Task title
"Call customer"
Task type (REQUIRED). Use 'make_call' for calls, 'send_message' for WhatsApp templates. For WhatsApp, you must ALSO set task_data.message_type='whatsapp_template'
make_call, send_message, send_email, follow_up, appointment, survey, notification, webhook, custom Agent UUID (REQUIRED) - replace with your agent UUID
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
When to execute task (must be future time, ISO 8601 format)
"2025-12-01T10:00:00Z"
Task description (optional)
"Follow-up call for appointment"
Existing contact UUID (use this OR contact object, not both)
Contact information. System will find existing contact by phone/email or create new one. Required if contact_uuid not provided.
Campaign UUID (optional)
Task timezone (optional)
"UTC"
Task priority 1-10 (default: 5)
1 <= x <= 108
Task expiration time (optional)
Maximum retry attempts (default: 3)
3
Minutes between retries (default: 60)
60
Retry strategy (default: fixed)
fixed, exponential, custom Task-specific data. For WhatsApp: REQUIRED fields are message_type='whatsapp_template' and template_uuid. For calls: can be empty or omit entirely.
Custom metadata (optional)
{ "source": "api", "campaign": "Q4" }Automatically queue task for execution (default: false)
true
Task created successfully