Skip to content
API Reference
Automations

Create triggered automation

Create triggered automation using the reviewed public Micro API contract. Authentication uses the x-api-key header.

POST/v2/prism/{teamId}/{automationObjectType}/triggered_automations
x-api-key<token>

Public API key generated from Micro settings. Sent as the x-api-key header and validated by AWS API Gateway in front of the service.

In: header

Path Parameters

teamId*string
Formatuuid
automationObjectType*string

Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).

Value in

  • "message"
  • "action"
  • "event"
  • "document"
  • "identity"
  • "linkedin_message"
  • "deal"
  • "organization"
  • "contact"

Header Parameters

Idempotency-Key?string

A unique key (UUID or any opaque string up to 255 chars) for an authenticated POST, PUT, or PATCH request. The server retains the initial claim for 24 hours and replays a completed non-5xx response only when the method, path, and request body all match. Reusing a non-expired key with a different method, path, or body returns 409 idempotency_key_mismatch; reusing it after expiry returns 409 idempotency_key_stale, so use a new key. Replays include the idempotent-replay: true response header.

Length1 <= length <= 255

Request Body

application/json

A triggered automation. kind selects the shape: update fires on object updates and requires a changeset (from/to transition) filter plus an optional state precondition; lifecycle fires on create and/or delete (on_create/on_delete) and requires a state filter (no changeset). state permits dot-paths (nested reference filters); changeset is direct properties only. Object type is taken from the path.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://developers.micro.so/v2/prism/${MICRO_TEAM_ID}/message/triggered_automations" \  -H "x-api-key: $MICRO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "kind": "update",    "name": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "update",  "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",  "list_id": "430bbdbc-9d7f-4d06-a273-67ca4ba4ae4b",  "user_id": "string",  "name": "string",  "enabled": true,  "on_create": true,  "on_delete": true,  "state": {    "combinator": "AND",    "filter": [      {}    ]  },  "changeset": {    "combinator": "AND",    "filter": [      {}    ]  },  "actions": [    {      "type": "agent",      "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",      "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",      "delay_seconds": 0,      "cron_expression": "string",      "timezone": "string",      "send_as_user_id": "string",      "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",      "subject": "string",      "recipient_view_id": "6b2423f8-a565-4727-a4aa-30cad80e92f3",      "recipient_view_object_type": "string",      "recipient_email_prop_def_id": "ea822df2-be8f-44ac-96ae-0ca6e9f17b56",      "recipient_provider_prop_def_id": "1e3ef3a0-36bd-441d-b5e0-90fc9dff4690"    }  ],  "created_at": "string",  "updated_at": "string"}
micro.so