v18

latestOpenAPI 3.1.0raw.githubusercontent.com2023-07-1410950.6 KB
Runs

Manually run a trigger

Creates an ad hoc run of the trigger. You can run triggers that are not in the cancelled state.

post/triggers/{trigger-name}/run

Request body

mode'sync' | 'async'

Example request

{
  "mode": "sync"
}

Response

OK

idstring

A unique identifier generated by the server to identify a particular run of the trigger.

created_atstring date-time

RFC3339 datetime indicating when the run was created.

status'attempting' | 'succeeded' | 'failed'

The status of the run. An attempting run means that it's still in-progress, there are possibly one or more delivery attempts linked to this run. Both succeeded and failed are terminal states.

Example response

{
  "id": "run_063001H1Y9BH9FJNHZNHGH4NVD1RXQ",
  "created_at": "2023-03-25T17:43:23.654278298Z",
  "action": {
    "url": "https://example.com/my-own-endpoint",
    "http_method": "POST",
    "timeout_s": 6.2,
    "type": "webhook",
    "retry": {
      "max_num_attempts": 5,
      "delay_s": 10,
      "type": "simple"
    }
  },
  "status": "succeeded",
  "payload": {
    "body": "My Message Payload",
    "content_type": "application/json; charset=utf-8",
    "headers": {
      "X-Custom-Header": "Custom-Value"
    }
  }
}