Create automation
create_automationCreate a triggered text flow (as a draft): when trigger.event is tracked, run steps such as send_sms, wait, wait_for_event, and condition branches. Example: on cart_abandoned, wait 3600s, then if checkout_completed was not received send a reminder. A send_sms step with send_time: "optimal_user_time" and max_wait_seconds (60 to 86400, required) waits for the hour that person usually replies or clicks, 10am their time with no history, inside quiet hours: recommend it for marketing and lifecycle texts, leave it off anything time-sensitive, and it is refused for one-time codes and order or shipping texts. For events that repeat, trigger.cooldown_seconds stops the same person starting it again for that long. Merge fields like {{plan}} fill from the trigger event's properties; issues names any no tracked event carries. Leave out from and TextKit picks a number approved for category (marketing, transactional for alerts, otp for codes) when it sends; sender shows the numbers, and issues says so when none is approved yet. Pass from only to pin a number. Drafts send nothing until activated.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | One of your numbers, to pin the flow to it. Leave it out and TextKit picks a number approved for `category`. A sandbox number makes it a sandbox flow. | |
| name | No | Automation name | |
| steps | No | Up to 20 steps, run in order | |
| trigger | No | What starts a run: an event, with optional filters | |
| category | No | What it sends: marketing, alerts (transactional) or codes (otp). With no `from`, TextKit picks a number approved for this. Falls back to a built-in topic. | |
| topic_id | No | Skip recipients unsubscribed from this topic. |