Destinations API
Destinations are attached to provider accounts and define where notifications are sent when events match conditions.
List Destinations
Section titled “List Destinations”GET /admin/accounts/{account_id}/destinationsExample:
curl https://ingest.transyt.com/admin/accounts/{account_id}/destinations \ -H "X-Admin-Token: YOUR_ADMIN_TOKEN"Response:
[ { "id": "dest-uuid", "destination_type": "slack", "name": "Payment Alerts", "enabled": true, "config": {"webhook_url": "https://hooks.slack.com/services/..."}, "condition": "delivery_failed", "position": 0 }]Create Destination
Section titled “Create Destination”POST /admin/accounts/{account_id}/destinationsRequest Body:
| Field | Type | Required | Description |
|---|---|---|---|
destination_type | string | Yes | webhook, email, slack, or discord |
name | string | Yes | Display name (max 200 chars) |
config | object | Yes | Type-specific configuration |
condition | string | No | Expression that determines when the destination fires |
enabled | boolean | No | Whether the destination is active (default: true) |
position | integer | No | Sort order (default: 0) |
Config by Type
Section titled “Config by Type”Webhook:
{"url": "https://example.com/hook", "secret": "optional-hmac-secret"}Email:
{"addresses": ["ops@example.com"], "include_payload": true}Slack:
{"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"}Discord:
{"webhook_url": "https://discord.com/api/webhooks/xxx/yyy"}Example:
curl -X POST https://ingest.transyt.com/admin/accounts/{account_id}/destinations \ -H "X-Admin-Token: YOUR_ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "destination_type": "slack", "name": "Delivery Failures", "config": {"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"}, "condition": "delivery_failed" }'Update Destination
Section titled “Update Destination”PATCH /admin/accounts/{account_id}/destinations/{destination_id}Accepts the same fields as create. Only included fields are updated.
Delete Destination
Section titled “Delete Destination”DELETE /admin/accounts/{account_id}/destinations/{destination_id}