# run_automation

> Starts an active automation of the trigger type api_call for one contact. Call it without plan_id for the preview, then with the plan_id and a different idempotency_key. If the start fails, the plan stays valid.

Last updated: 2026-10-25. Source: https://docs.smartchat.marketing/en/mcp/tools/run_automation/

Starts an active automation of the trigger type api_call for one contact. Call it without plan_id for the preview, then with the plan_id and a different idempotency_key. If the start fails, the plan stays valid.

| | |
|---|---|
| Tool name | `run_automation` |
| Permission | `automations:run` |
| `readOnlyHint` | false |
| `destructiveHint` | false |
| `idempotentHint` | true |
| `openWorldHint` | true |
| REST call | [`POST /v1/automations/{automation_id}/runs`](https://docs.smartchat.marketing/en/api/reference/automations/create_automation_run/) |

## What it does

- Sends WhatsApp messages to contacts.
- Needs a confirmation step (a preview first).
- Safe to repeat with the same idempotency_key.

## Input

The tool takes one flat object. Path, query and body fields of the REST call are merged into it.


| Name | Type | Required | Description |
|---|---|---|---|
| `automation_id` | string | yes | Automation ID. |
| `contact` | object | yes | The contact. A phone number or an email is needed. |
| `contact.phone` | string | no | Phone number in E.164 format. up to 16 characters; format e164 |
| `contact.email` | string | no | Email address. up to 254 characters; format email |
| `contact.name` | string | no | Name of the contact. up to 120 characters |
| `data` | object | no | Values for the {{variables}} the automation uses (up to 30 fields; names the automation does not use or the system reserves are refused; values up to 100 characters, no line break, no web address). The preview shows whether the contact is new. |
| `plan_id` | string | no | Plan ID from the preview call. Without it you get the preview. |

**Arguments added by the MCP server** (see [Special arguments](https://docs.smartchat.marketing/en/mcp/#special-arguments))

| Name | Type | Required | Description |
|---|---|---|---|
| `idempotency_key` | string | yes | Required. Unique key for this action, for example a UUID. Same key and arguments within 24 hours: first result, nothing done again. up to 255 characters |

## Result

The result has the same content as the REST answer. Lists have at most 50 items per page (default 20); use `cursor` for the next page.

Errors come back as a tool result with `isError: true`. The error codes are the ones in [Errors](https://docs.smartchat.marketing/en/errors/).
