Skip to main content
POST
/
api
/
v1
/
tasks
curl --request POST \
  --url https://{subdomain}.mindhunters.ai/api/v1/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Call customer",
  "type": "make_call",
  "contact": {
    "phone_number": "+1234567890"
  },
  "agent_uuid": "your-agent-uuid-here",
  "scheduled_at": "2025-12-01T14:00:00Z",
  "auto_queue": true
}
'

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Body

application/json

Request body varies by task type. See examples for 'make_call' and 'send_message' (WhatsApp template).

title
string
required

Task title

Example:

"Call customer"

type
enum<string>
required

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'

Available options:
make_call,
send_message,
send_email,
follow_up,
appointment,
survey,
notification,
webhook,
custom
agent_uuid
string<uuid>
required

Agent UUID (REQUIRED) - replace with your agent UUID

Example:

"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

scheduled_at
string<date-time>
required

When to execute task (must be future time, ISO 8601 format)

Example:

"2025-12-01T10:00:00Z"

description
string

Task description (optional)

Example:

"Follow-up call for appointment"

contact_uuid
string<uuid>

Existing contact UUID (use this OR contact object, not both)

contact
object

Contact information. System will find existing contact by phone/email or create new one. Required if contact_uuid not provided.

campaign_uuid
string<uuid>

Campaign UUID (optional)

timezone
string

Task timezone (optional)

Example:

"UTC"

priority
integer

Task priority 1-10 (default: 5)

Required range: 1 <= x <= 10
Example:

8

expires_at
string<date-time>

Task expiration time (optional)

max_attempts
integer

Maximum retry attempts (default: 3)

Example:

3

retry_delay_minutes
integer

Minutes between retries (default: 60)

Example:

60

retry_strategy
enum<string>

Retry strategy (default: fixed)

Available options:
fixed,
exponential,
custom
task_data
object

Task-specific data. For WhatsApp: REQUIRED fields are message_type='whatsapp_template' and template_uuid. For calls: can be empty or omit entirely.

metadata
object

Custom metadata (optional)

Example:
{ "source": "api", "campaign": "Q4" }
auto_queue
boolean

Automatically queue task for execution (default: false)

Example:

true

Response

Task created successfully