Actions API
Base path: /api/sources/{slug}/actions
List actions
Section titled “List actions”GET /api/sources/{slug}/actionsReturns all actions attached to the source.
Create action
Section titled “Create action”POST /api/sources/{slug}/actionsContent-Type: application/json
{ "type": "webhook", "target_url": "https://example.com/hook", "is_active": true}| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | One of: webhook, slack, smtp, twilio, javascript |
target_url | string | For webhook | Destination URL |
script_body | string | For javascript | JavaScript source code |
signing_secret | string | No | HMAC-SHA256 signing secret |
config | object | For slack/smtp/twilio | Type-specific configuration (see Action Types) |
transform_script | string | No | Per-action transform script |
is_active | boolean | No | Whether the action is active (default: true) |
Get action
Section titled “Get action”GET /api/sources/{slug}/actions/{id}Update action
Section titled “Update action”PATCH /api/sources/{slug}/actions/{id}Content-Type: application/json
{ "is_active": false}Delete action
Section titled “Delete action”DELETE /api/sources/{slug}/actions/{id}