Developers
Run automations by API
Any automation can be started from outside appTown with an HTTP call. Use it for
"do xyz" actions. For example, a send-welcome-pack automation that your website calls
when someone signs up. (Services that can't send an API key can use an
incoming webhook instead.)
#Set it up
- In the app editor (Build → Automations), create an automation with the trigger An API call, then publish the app.
- Its API name is made from its name (
Send welcome pack→send-welcome-pack); change it on the automation's page. It must be unique in the app: lowercase letters, digits and-. - Choose who may run it: everyone with access to the app, only some roles, or only owners and editors (who always may).
In the automation's steps, read the JSON you sent with INPUT("path"), for example
INPUT("email") or INPUT("customer.name").
#Call it
curl -X POST https://apptown.app/api/v1/apps/APP_ID/automations/send-welcome-pack/run \
-H "Authorization: Bearer at_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f1c0b9e-3d1a-4c55-9a51-2a8f0e7c1d22" \
-d '{"email": "new.person@example.com", "plan": "pro"}'
The body is JSON of at most 1 MB. The automation runs in the background and the call
returns at once with 202 Accepted:
{
"id": "0192f1a0-…",
"automation": "send-welcome-pack",
"status": "queued",
"created_at": "2026-11-04T14:05:00Z",
"status_url": "https://apptown.app/api/v1/apps/APP_ID/runs/0192f1a0-…"
}
Send an Idempotency-Key so a retried call starts only one run: a repeat with the same key
answers 200 OK with the first run.
#Check a run
GET /api/v1/apps/{app}/runs/{run} (the status_url) answers the same shape, with
finished_at and error once it's done. status is one of queued, running,
succeeded, failed, retrying, dead (gave up after retrying), skipped or
cancelled. You can check runs you started; owners and editors can check any run. The
app's builders see every run, with step-by-step detail, under Build → Automations.
#Who the automation acts as
The run acts as the caller (the API key's user). Steps that read or write records do so with that person's permissions, exactly as if they had clicked a button in the app. (Automations started any other way act with the app's own authority.)
#Errors
The same error shape as the REST API: 404 not_found for an unknown
API name (or an automation not started by API calls), 403 forbidden when you may not run
it (or the key is read only), 409 paused when it is paused.