Create an outbound task
create_taskCreate an outbound call task - a bulk campaign that dials a list of recipients with one of this account's voice agents. Always created in the draft state; nothing is dialled until start_task runs it, so this alone never costs anything. To start the task later, the agent must have provider engine - pass create_agent useForOutboundTasks: true, or when omitting it verify the returned provider before continuing. An ElevenLabs agent is accepted here but start_task refuses it with engine_required. budgetHal must cover at least one call at maxDurationSecs or this fails with budget_too_low; without retryPolicy, maxAttempts is 1-3 and defaults to one. Opt-in lorela_enterprise allows 1-4 and defaults to four at creation. expiresAt is an optional campaign deadline checked before every dial, including the first. Opt-in retry schedule: second at least 8 minutes after the first real attempt starts, within 08:00-22:00 Europe/Prague; third in the next other 08:00-09:00 or 17:00-19:00 window; fourth in the opposite window the following calendar day. Optional retryWindows wide widens the third and fourth attempt windows to morning 08:00-13:00 and afternoon 13:00-20:00 (default peak = the narrow windows; accepted only with the policy). Respects callingWindow and its weekdays, expiry, DNC, budget and limits. Tasks cannot be scheduled from a number in Australia and New Zealand, where the recipient's local time is not verified; creating or starting such a task fails with destination_not_allowed. Only no_answer, missed, busy or completed voicemail without human contact retry; human contact, refusal and engine failure stop retries, ambiguous results need review. Hard cap of four attempts and of the retry horizon: optional retryMaxAgeDays, a whole number 1-30 (default 5) that ends N × 24 hours from the first counted attempt of each recipient, accepted only with the policy. Manual resolve retry after any actual attempt is rejected. A provably undialed expired claim may be restored before its first attempt; the resolver description gives the guards. Omit to preserve the existing retry behavior. Up to 1000 recipients are accepted, and the complete stored task JSON is capped at 2 MB. Same data as POST /v1/tasks (response schema in /openapi.json).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"agentId": "<agentId>",
"taskType": "<taskType>",
"source": "<source>",
"recipients": "<recipients>",
"budgetHal": "<budgetHal>"
},
"name": "create_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for this task, shown in the portal and in list_tasks, 1 to 120 characters. | |
| source | Yes | Where the recipient list came from: manual (typed or pasted by a human) or integration (generated from a connected calendar or accounting system, requiring externalRefs on every recipient). | |
| agentId | Yes | Id of the agent that dials every recipient, from list_agents. Looks like ag_9f3a2b7c4d1e. | |
| purpose | No | Immutable purpose, standard by default. coupon_reminder requires manual/custom, explicit maxAttempts 1 and expiresAt; a configured trusted server preflight must approve each reminder before dialing. User variables cannot set reminder coupon metadata or greeting. | |
| taskType | Yes | What this task is for: invoice, appointment, or custom. With source manual it only labels the task; with source integration it picks the required externalRefs field per recipient - invoice needs externalRefs.invoice, appointment needs externalRefs.calendar, custom accepts either. | |
| budgetHal | Yes | Total budget for this task in hellers (1/100 CZK). Must cover the cost of at least one maximum-duration attempt, or creation fails with budget_too_low. | |
| expiresAt | No | Optional campaign deadline as positive safe-integer Unix milliseconds. At or after it, no new call may start, including the first; no attempt is consumed. A call already in progress finishes normally. | |
| recipients | Yes | Recipients to call, 1 to 1000 entries; each needs a phone number and may carry variables and an external reference. The complete stored task JSON is also capped at 2 MB. | |
| maxAttempts | No | Maximum automatic dials per recipient including the first: 1-3 without retryPolicy (default 1), 1-4 with lorela_enterprise (default 4). A value of 4 requires that policy. | |
| retryPolicy | No | Enable lorela_enterprise: up to four attempts within the retry horizon (retryMaxAgeDays, default 5) of the first counted attempt. Human contact stops retries; manual retry after an actual attempt is rejected. Schedule: see the tool description. Omit to keep existing behavior. | |
| externalRefs | No | Task-level link to the invoice or calendar event this whole task is about, applied to every recipient that does not set its own externalRefs. | |
| retryWindows | No | Windows of the 3rd and 4th attempt of lorela_enterprise: peak (default, 08:00-09:00 and 17:00-19:00) or wide (08:00-13:00 and 13:00-20:00) in the callingWindow timezone. Needs the policy in this request. Omit for peak. | |
| callingWindow | No | Calling window that limits when this task is allowed to dial. Defaults to weekdays 09:00 to 18:00 Europe/Prague when omitted. | |
| maxDurationSecs | No | Maximum call duration per attempt in seconds, 30 to 300 - used to estimate and reserve cost. Defaults to 120 seconds when omitted. | |
| retryMaxAgeDays | No | Retry horizon of lorela_enterprise: a whole number of days 1-30. It ends N × 24 hours from the first counted attempt of each recipient, then no further automatic attempt starts. Defaults to 5 when omitted. Requires retryPolicy lorela_enterprise in the same call. |