Skip to content

Destinations API

Destinations are attached to provider accounts and define where notifications are sent when events match conditions.

GET /admin/accounts/{account_id}/destinations

Example:

Terminal window
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
}
]
POST /admin/accounts/{account_id}/destinations

Request Body:

FieldTypeRequiredDescription
destination_typestringYeswebhook, email, slack, or discord
namestringYesDisplay name (max 200 chars)
configobjectYesType-specific configuration
conditionstringNoExpression that determines when the destination fires
enabledbooleanNoWhether the destination is active (default: true)
positionintegerNoSort order (default: 0)

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:

Terminal window
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"
}'
PATCH /admin/accounts/{account_id}/destinations/{destination_id}

Accepts the same fields as create. Only included fields are updated.

DELETE /admin/accounts/{account_id}/destinations/{destination_id}