automations

Create an automation (paused draft)

Instantiate a recipe as a PAUSED automation for a human to review and activate in the dashboard.

Pass recipe_id (either/or), or a free-form definition object ({ filters: [], actions: [], … }, the same JSON the dashboard builder edits) plus channel (whatsapp, sms or email). Free-form definitions run the full validator and are rejected with the fix list on 422.

That 422 is the one answer here outside the Error envelope: { "ok": false, "error": "invalid_definition", "detail": [ ... ] }, where detail is a list of sentences, one for each thing to fix in the definition. Branch on error being the string "invalid_definition".

With recipe_id, pass api_events: ["your.event"] to replace the recipe's listening list with YOUR event names. Without it a recipe listens for its example event forever: an automation that looks wired and can never fire.

enabled is forced FALSE regardless of input. Nothing created here can message a customer until a human flips it live.

An SMS send_message step may carry smsMessageType: marketing for a promotional text, transactional for an order or service update. A marketing SMS goes only to contacts who opted in to SMS marketing, and only in the SMS sending hours (Mon-Fri 08:00-20:00, Sat 09:00-13:00, never Sundays or public holidays, or narrower in the workspace's SMS settings). When it is absent the step goes as transactional, except in a run started by commerce.order.abandoned (a basket win-back is promotional), where it goes as marketing; send it to say which. Any other value is ignored. WhatsApp and email steps do not read it.

Multi-business workspaces must pass business_id; single-business ones may omit it.

automations:write is part of the agent Prepare profile precisely because of this draft-only guarantee.

post/api/v1/automations

Request

  • Base URL: https://app.blueticked.com
  • URL: https://app.blueticked.com/api/v1/automations
  • Auth: HTTP bearer

Request body

OR

Response

Success

okboolean required
notestring required

Example response

{
  "ok": true,
  "automation": {
    "id": "7cd00b02-a9c7-4a24-bf34-a870305f214a",
    "business_id": "22222222-2222-4222-9222-222222222222",
    "name": "Shop order updates",
    "channel": "sms",
    "trigger_type": "api_event",
    "status": "paused",
    "priority": 100,
    "updated_at": "2026-08-05T08:00:00.000Z"
  },
  "note": "Created as a paused draft. A human reviews and activates it in the dashboard (Automations → open → Enable)."
}

Changes

No recorded changes to this operation across all 1 revision of this API.