# Get triggered automation



**Endpoint:** `GET /v2/prism/{teamId}/{automationObjectType}/triggered_automations/{automationId}`  
**Operation ID:** `getTriggeredAutomation`  
**Server:** `https://developers.micro.so`  
**Security:** `[{"apiKey":[]}]`

## Parameters

```json
[
  {
    "name": "teamId",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  },
  {
    "name": "automationObjectType",
    "in": "path",
    "required": true,
    "schema": {
      "$ref": "#/components/schemas/AutomationObjectType"
    }
  },
  {
    "name": "automationId",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  }
]
```

## Request body

```json
null
```

## Responses

```json
{
  "200": {
    "description": "OK",
    "headers": {
      "x-request-id": {
        "$ref": "#/components/headers/XRequestId"
      },
      "etag": {
        "$ref": "#/components/headers/ETag"
      }
    },
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/TriggeredAutomationBundle"
        }
      }
    }
  },
  "400": {
    "$ref": "#/components/responses/BadRequest"
  },
  "401": {
    "$ref": "#/components/responses/Unauthorized"
  },
  "403": {
    "$ref": "#/components/responses/Forbidden"
  },
  "500": {
    "$ref": "#/components/responses/InternalError"
  }
}
```

## Referenced components

```json
{
  "securitySchemes": {
    "apiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "x-api-key",
      "description": "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."
    }
  },
  "schemas": {
    "AutomationObjectType": {
      "type": "string",
      "description": "Object types that support triggered automations. Must match the triggered-automation whitelist in @micro/database migrate-sql (TRIGGERED_AUTOMATION_OBJECTS).",
      "enum": [
        "message",
        "action",
        "event",
        "document",
        "identity",
        "linkedin_message",
        "deal",
        "organization",
        "contact"
      ]
    },
    "TriggeredAutomationBundle": {
      "type": "object",
      "description": "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.",
      "required": [
        "name",
        "kind"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "kind": {
          "type": "string",
          "enum": [
            "update",
            "lifecycle"
          ]
        },
        "team_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "list_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "user_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "on_create": {
          "type": "boolean",
          "description": "Lifecycle automations only."
        },
        "on_delete": {
          "type": "boolean",
          "description": "Lifecycle automations only."
        },
        "state": {
          "$ref": "#/components/schemas/TriggeredAutomationFilterGroup"
        },
        "changeset": {
          "$ref": "#/components/schemas/TriggeredAutomationChangesetGroup"
        },
        "actions": {
          "type": "array",
          "description": "Actions to run when the automation fires; each item has a `type` plus type-specific fields.",
          "items": {
            "$ref": "#/components/schemas/TriggeredAutomationAction"
          }
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "TriggeredAutomationFilterGroup": {
      "type": "object",
      "description": "A filter group: a combinator plus an array of slug-based clauses. Dot-paths (e.g. `organization.location`) express nested reference filters.",
      "properties": {
        "combinator": {
          "type": "string",
          "enum": [
            "AND",
            "OR"
          ]
        },
        "filter": {
          "type": "array",
          "description": "Each entry is { slug: { comparator: value } }",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": false
    },
    "TriggeredAutomationChangesetGroup": {
      "type": "object",
      "description": "A changeset filter group (update automations only): a combinator plus an array of transition clauses matching what is changing. Dot-paths (nested reference filters) are NOT permitted — direct properties only.",
      "properties": {
        "combinator": {
          "type": "string",
          "enum": [
            "AND",
            "OR"
          ]
        },
        "filter": {
          "type": "array",
          "description": "Each entry is a transition clause { slug: { from?: { comparator: value }, to?: { comparator: value } } }. `from` matches the prior value, `to` the new value; an empty body { slug: {} } matches any change to that property.",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": false
    },
    "TriggeredAutomationAction": {
      "type": "object",
      "description": "An action the automation runs when it fires. `type` selects the kind; the remaining fields are type-specific (`agent` → `agent_id`, `webhook` → `webhook_id`, `email`/`linkedin` → the send-as user, template, and recipient-view fields). Generic: new action types add fields here.",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "agent",
            "webhook",
            "wait",
            "email",
            "linkedin"
          ]
        },
        "agent_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Required when `type` is `agent`. The agent to run."
        },
        "webhook_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Required when `type` is `webhook`. The id of the webhook the event is dispatched to (async) when the automation fires."
        },
        "delay_seconds": {
          "type": [
            "integer",
            "null"
          ],
          "description": "wait: relative delay in seconds. Exactly one of delay_seconds or cron_expression."
        },
        "cron_expression": {
          "type": [
            "string",
            "null"
          ],
          "description": "wait: cron schedule for the resume time. Exactly one of delay_seconds or cron_expression."
        },
        "timezone": {
          "type": [
            "string",
            "null"
          ],
          "description": "wait: IANA timezone for evaluating cron_expression (optional)."
        },
        "send_as_user_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Required when `type` is `email` or `linkedin`. The user (external id) the message is sent as."
        },
        "template_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Required when `type` is `email` or `linkedin`. The email-template document whose body is rendered (Liquid) per recipient."
        },
        "subject": {
          "type": [
            "string",
            "null"
          ],
          "description": "Required when `type` is `email`. The subject line; rendered as a Liquid template per recipient."
        },
        "recipient_view_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Required when `type` is `email` or `linkedin`. The saved prism view resolved at send time to the recipient audience (its filter re-runs each step, so responders drop out of later drip sends)."
        },
        "recipient_view_object_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Required when `type` is `email` or `linkedin`. Must be `contact` — the recipient audience is a contact view (contacts carry the direct email / linkedin provider property)."
        },
        "recipient_email_prop_def_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Required when `type` is `email`. The property (on the recipient view object) holding the recipient email address."
        },
        "recipient_provider_prop_def_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Required when `type` is `linkedin`. The property (on the recipient view object) holding the recipient LinkedIn provider id."
        }
      },
      "additionalProperties": true
    },
    "Error": {
      "type": "object",
      "description": "Canonical JSON error envelope for every non-2xx v2 API response. `error.code` is the machine-readable error code, `error.message` is the human-readable summary, and `error.request_id` identifies the request for support. When supplied, `error.errors` contains field-level validation issues.",
      "required": [
        "error"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "request_id"
          ],
          "properties": {
            "code": {
              "type": "string",
              "description": "Stable machine-readable code. Branch on this, not on the HTTP status, to handle specific failure modes.",
              "example": "invalid_request"
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary suitable for logs. Not localized; do not display verbatim to end users."
            },
            "request_id": {
              "type": [
                "string",
                "null"
              ],
              "description": "Echo of the x-request-id response header. Include in support requests."
            },
            "errors": {
              "type": "array",
              "description": "Optional structured field-level validation issues when the server provides them.",
              "items": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string",
                    "description": "JSON path of the offending property (e.g. \".body.default.email\")."
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string",
                    "description": "Validator-specific code (e.g. \"required.openapi.validation\")."
                  }
                },
                "required": [
                  "message"
                ]
              }
            },
            "details": {
              "type": "object",
              "description": "Optional bag of error-specific context. Shape varies by code; clients should treat fields as opaque unless documented."
            }
          }
        }
      }
    }
  },
  "headers": {
    "XRequestId": {
      "description": "Correlation ID. Echoed from the request `x-request-id` header when supplied, otherwise generated. Include in support requests.",
      "schema": {
        "type": "string"
      }
    },
    "ETag": {
      "description": "Weak entity tag for the returned record. Capture and send back as `If-Match` on a subsequent PATCH or DELETE to enforce optimistic concurrency.",
      "schema": {
        "type": "string"
      }
    }
  },
  "responses": {
    "BadRequest": {
      "description": "Request validation failed. Inspect `error.errors` for field-level details.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "Unauthorized": {
      "description": "Missing or invalid credentials. API Gateway maps a missing or invalid `x-api-key` to HTTP 401 with this envelope (including `request_id`). A 403 here means the key was accepted but the caller is not permitted.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "Forbidden": {
      "description": "Authenticated but not permitted to perform this action.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "InternalError": {
      "description": "Unexpected server error. Retry with backoff; report `request_id` if persistent.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/XRequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```
