> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/api-reference/readme/platform/triggers.md).

# Triggers

## GET /v1/{workspace\_id}/triggers

> List triggers

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"TriggerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TriggerResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"TriggerListResponse"},"TriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"Trigger display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"event_type":{"type":"string","title":"Event Type","description":"Event type pattern to match"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter","description":"JSONPath filter on event data"},"action_id":{"type":"string","format":"uuid","title":"Action Id","description":"Action (skill) to invoke when fired"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template","description":"Input template merged with event data"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Cron schedule expression (e.g. '0 9 * * 1-5')"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone for schedule evaluation"},"next_fire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Fire At","description":"Next scheduled fire time"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the trigger is active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Entity ID of the creator"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the trigger was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the trigger was last updated"}},"type":"object","required":["id","workspace_id","name","event_type","action_id","input_template","timezone","is_active"],"title":"TriggerResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/triggers":{"get":{"tags":["Triggers"],"summary":"List triggers","operationId":"list-triggers","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"default":50,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```

## POST /v1/{workspace\_id}/triggers

> Create a trigger

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CreateTriggerRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"event_type":{"$ref":"#/components/schemas/TriggerableEvent"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"},"action_id":{"type":"string","format":"uuid","title":"Action Id"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template"},"schedule":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Schedule"},"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone","default":"UTC"}},"type":"object","required":["name","event_type","action_id"],"title":"CreateTriggerRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"TriggerableEvent":{"type":"string","enum":["amigo.trigger.cron","appointment.booked","appointment.cancelled","appointment.confirmed","booking.requested","call.intelligence","call.outcome","channel.email.bounced","channel.email.clicked","channel.email.complained","channel.email.delayed","channel.email.delivered","channel.email.opened","channel.email.received","channel.email.rejected","channel.message.received","channel.voice.voicemail_status","conversation.channel_switched","conversation.started","conversation.turn_recorded","coverage.created","entity.enriched","entity.resolved","intake.file.received","medication.refill_requested","outbound.initiated","outbound.scheduled","patient.created","patient.updated","relationship.established","review.approve","review.correct","review.reject","surface.created","surface.submitted","ticket.created","triage.completed","trigger.completed","trigger.failed","trigger.fired"],"title":"TriggerableEvent","description":"Closed set of world events that trigger definitions may subscribe to.\n\nThe database column intentionally remains text for compatibility with old\nrows, but API writes must choose from this list so typoed event names do\nnot silently create never-matching triggers."},"TriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"Trigger display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"event_type":{"type":"string","title":"Event Type","description":"Event type pattern to match"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter","description":"JSONPath filter on event data"},"action_id":{"type":"string","format":"uuid","title":"Action Id","description":"Action (skill) to invoke when fired"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template","description":"Input template merged with event data"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Cron schedule expression (e.g. '0 9 * * 1-5')"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone for schedule evaluation"},"next_fire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Fire At","description":"Next scheduled fire time"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the trigger is active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Entity ID of the creator"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the trigger was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the trigger was last updated"}},"type":"object","required":["id","workspace_id","name","event_type","action_id","input_template","timezone","is_active"],"title":"TriggerResponse"}}},"paths":{"/v1/{workspace_id}/triggers":{"post":{"tags":["Triggers"],"summary":"Create a trigger","operationId":"create-trigger","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTriggerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}}},"422":{"description":"Validation error"},"429":{"description":"Rate limited"}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## GET /v1/{workspace\_id}/triggers/{trigger\_id}

> Get a trigger

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"TriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"Trigger display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"event_type":{"type":"string","title":"Event Type","description":"Event type pattern to match"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter","description":"JSONPath filter on event data"},"action_id":{"type":"string","format":"uuid","title":"Action Id","description":"Action (skill) to invoke when fired"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template","description":"Input template merged with event data"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Cron schedule expression (e.g. '0 9 * * 1-5')"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone for schedule evaluation"},"next_fire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Fire At","description":"Next scheduled fire time"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the trigger is active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Entity ID of the creator"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the trigger was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the trigger was last updated"}},"type":"object","required":["id","workspace_id","name","event_type","action_id","input_template","timezone","is_active"],"title":"TriggerResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}":{"get":{"tags":["Triggers"],"summary":"Get a trigger","operationId":"get-trigger","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}}},"404":{"description":"Trigger not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```

## PUT /v1/{workspace\_id}/triggers/{trigger\_id}

> Update a trigger

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"UpdateTriggerRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"event_type":{"anyOf":[{"$ref":"#/components/schemas/TriggerableEvent"},{"type":"null"}]},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"},"action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Action Id"},"input_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Template"},"schedule":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Schedule"},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"UpdateTriggerRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"TriggerableEvent":{"type":"string","enum":["amigo.trigger.cron","appointment.booked","appointment.cancelled","appointment.confirmed","booking.requested","call.intelligence","call.outcome","channel.email.bounced","channel.email.clicked","channel.email.complained","channel.email.delayed","channel.email.delivered","channel.email.opened","channel.email.received","channel.email.rejected","channel.message.received","channel.voice.voicemail_status","conversation.channel_switched","conversation.started","conversation.turn_recorded","coverage.created","entity.enriched","entity.resolved","intake.file.received","medication.refill_requested","outbound.initiated","outbound.scheduled","patient.created","patient.updated","relationship.established","review.approve","review.correct","review.reject","surface.created","surface.submitted","ticket.created","triage.completed","trigger.completed","trigger.failed","trigger.fired"],"title":"TriggerableEvent","description":"Closed set of world events that trigger definitions may subscribe to.\n\nThe database column intentionally remains text for compatibility with old\nrows, but API writes must choose from this list so typoed event names do\nnot silently create never-matching triggers."},"TriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"Trigger display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"event_type":{"type":"string","title":"Event Type","description":"Event type pattern to match"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter","description":"JSONPath filter on event data"},"action_id":{"type":"string","format":"uuid","title":"Action Id","description":"Action (skill) to invoke when fired"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template","description":"Input template merged with event data"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Cron schedule expression (e.g. '0 9 * * 1-5')"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone for schedule evaluation"},"next_fire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Fire At","description":"Next scheduled fire time"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the trigger is active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Entity ID of the creator"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the trigger was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the trigger was last updated"}},"type":"object","required":["id","workspace_id","name","event_type","action_id","input_template","timezone","is_active"],"title":"TriggerResponse"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}":{"put":{"tags":["Triggers"],"summary":"Update a trigger","operationId":"update-trigger","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}}},"404":{"description":"Trigger not found"},"422":{"description":"Validation error"},"429":{"description":"Rate limited"}}}}}}
```

## DELETE /v1/{workspace\_id}/triggers/{trigger\_id}

> Delete a trigger

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}":{"delete":{"tags":["Triggers"],"summary":"Delete a trigger","operationId":"delete-trigger","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```

## POST /v1/{workspace\_id}/triggers/{trigger\_id}/pause

> Pause a trigger

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"TriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"Trigger display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"event_type":{"type":"string","title":"Event Type","description":"Event type pattern to match"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter","description":"JSONPath filter on event data"},"action_id":{"type":"string","format":"uuid","title":"Action Id","description":"Action (skill) to invoke when fired"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template","description":"Input template merged with event data"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Cron schedule expression (e.g. '0 9 * * 1-5')"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone for schedule evaluation"},"next_fire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Fire At","description":"Next scheduled fire time"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the trigger is active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Entity ID of the creator"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the trigger was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the trigger was last updated"}},"type":"object","required":["id","workspace_id","name","event_type","action_id","input_template","timezone","is_active"],"title":"TriggerResponse"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}/pause":{"post":{"tags":["Triggers"],"summary":"Pause a trigger","operationId":"pause-trigger","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}}},"404":{"description":"Trigger not found"},"422":{"description":"Validation error"},"429":{"description":"Rate limited"}}}}}}
```

## POST /v1/{workspace\_id}/triggers/{trigger\_id}/resume

> Resume a trigger

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"TriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"Trigger display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description"},"event_type":{"type":"string","title":"Event Type","description":"Event type pattern to match"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter","description":"JSONPath filter on event data"},"action_id":{"type":"string","format":"uuid","title":"Action Id","description":"Action (skill) to invoke when fired"},"input_template":{"additionalProperties":true,"type":"object","title":"Input Template","description":"Input template merged with event data"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule","description":"Cron schedule expression (e.g. '0 9 * * 1-5')"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone for schedule evaluation"},"next_fire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Fire At","description":"Next scheduled fire time"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the trigger is active"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Entity ID of the creator"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the trigger was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the trigger was last updated"}},"type":"object","required":["id","workspace_id","name","event_type","action_id","input_template","timezone","is_active"],"title":"TriggerResponse"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}/resume":{"post":{"tags":["Triggers"],"summary":"Resume a trigger","operationId":"resume-trigger","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponse"}}}},"404":{"description":"Trigger not found"},"422":{"description":"Validation error"},"429":{"description":"Rate limited"}}}}}}
```

## POST /v1/{workspace\_id}/triggers/{trigger\_id}/fire

> Manually fire a trigger now

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"FireTriggerRequest":{"properties":{"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input","description":"Optional overrides merged into the trigger's input_template at fire time."}},"type":"object","title":"FireTriggerRequest"},"TriggerFireResponse":{"properties":{"fired_event_id":{"type":"string","format":"uuid","title":"Fired Event Id"},"trigger_id":{"type":"string","format":"uuid","title":"Trigger Id"},"status":{"type":"string","const":"fired","title":"Status","default":"fired"}},"type":"object","required":["fired_event_id","trigger_id"],"title":"TriggerFireResponse"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}/fire":{"post":{"tags":["Triggers"],"summary":"Manually fire a trigger now","operationId":"fire-trigger","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FireTriggerRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerFireResponse"}}}},"404":{"description":"Trigger not found"},"422":{"description":"Validation error"},"429":{"description":"Rate limited"},"503":{"description":"Trigger scheduler not initialized"}}}}}}
```

## List trigger execution history

> Execution history from the durable trigger run table.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"TriggerRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TriggerRunResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"TriggerRunListResponse"},"TriggerRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"trigger_id":{"type":"string","format":"uuid","title":"Trigger Id"},"fired_event_id":{"type":"string","format":"uuid","title":"Fired Event Id"},"source":{"type":"string","enum":["cron","manual","webhook","event"],"title":"Source","description":"Source that fired the trigger"},"input_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Override","description":"Per-run input overrides"},"status":{"type":"string","enum":["queued","running","succeeded","failed","dead"],"title":"Status","description":"Run status"},"attempt_count":{"type":"integer","title":"Attempt Count","description":"Number of claim attempts"},"max_attempts":{"type":"integer","title":"Max Attempts","description":"Maximum claim attempts before dead-lettering"},"next_attempt_at":{"type":"string","format":"date-time","title":"Next Attempt At","description":"Next eligible claim time"},"claimed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed By","description":"Dispatcher consumer that claimed the run"},"claimed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Claimed At","description":"When the run was claimed"},"lease_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lease Expires At","description":"When the running lease expires"},"result_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Text","description":"Text result emitted by the action"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure detail, if any"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was enqueued"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the run row last changed"}},"type":"object","required":["id","workspace_id","trigger_id","fired_event_id","source","status","attempt_count","max_attempts","next_attempt_at","created_at","updated_at"],"title":"TriggerRunResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/triggers/{trigger_id}/runs":{"get":{"tags":["Triggers"],"summary":"List trigger execution history","description":"Execution history from the durable trigger run table.","operationId":"list-trigger-runs","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"default":50,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amigo.ai/api-reference/readme/platform/triggers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
