Channels
Add a Slack, Discord or email channel, confirm its recipients, test it, and turn it off or remove it.
A channel is a Slack or Discord webhook, or a list of email recipients, that projects send their alerts to.
Add a channel
type | Needs | Example |
|---|---|---|
slack | url: a Slack incoming webhook, https://hooks.slack.com/services/… | https://hooks.slack.com/services/T000/B000/XXXX |
discord | url: a Discord channel webhook, https://discord.com/api/webhooks/… (discordapp.com, canary.discord.com and ptb.discord.com work too) | https://discord.com/api/webhooks/123/abc |
email | recipients: 1 to 10 addresses | ["ops@example.com"] |
Every channel also needs a name, 1 to 80 characters. A workspace has at most 50 channels (409 channels_limit), besides its dashboard notifications.
curl https://dataflow.piloterr.com/v1/alert-channels \
-H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
-d '{"type": "slack", "name": "#data-ops", "url": "https://hooks.slack.com/services/T000/B000/XXXX"}'The answer, 201, is the channel:
{
"id": "CHANNEL_ID",
"type": "slack",
"name": "#data-ops",
"target": "hooks.slack.com/…/XXXX",
"recipients": [],
"failure_count": 0,
"last_error": null,
"disabled_at": null,
"disabled_reason": null,
"retry_at": null,
"failing_since": null,
"missed_count": 0,
"created_at": "2026-12-01T08:00:00.000Z"
}Webhook URLs are stored encrypted and never shown again: target only holds the host and the last 4 characters of the path, or the recipients separated by commas.
Email recipients
An email channel only sends to addresses that agreed to receive its alerts. Its recipients list each one with its status:
{
"id": "EMAIL_CHANNEL_ID",
"type": "email",
"name": "Data team",
"target": "ana@acme.com, ops@partner.com",
"recipients": [
{ "email": "ana@acme.com", "status": "member" },
{ "email": "ops@partner.com", "status": "pending" }
],
"failure_count": 0,
"last_error": null,
"disabled_at": null,
"disabled_reason": null,
"retry_at": null,
"failing_since": null,
"missed_count": 0,
"created_at": "2026-12-01T08:00:00.000Z"
}status | Receives the alerts |
|---|---|
member | Yes: a member of the workspace. |
verified | Yes: an address outside the workspace that confirmed it. |
pending | No: an address outside the workspace, waiting for confirmation. |
Each address outside the workspace gets a confirmation email when the channel is created, and receives nothing until it confirms. These are the same addresses, and the same confirmation, as for email deliveries: an address confirmed for one is confirmed for the other, and POST /v1/email-addresses sends a new confirmation email. They count against the workspace's 50 confirmation emails a day and 100 addresses waiting: past them, creating the channel answers 429 confirmation_quota and nothing is created or sent.
Each recipient gets its own email, with a link to unsubscribe. Unsubscribing takes the address off this channel only. A member of the workspace keeps their other Dataflow emails: other channels, run emails and summaries. An address outside the workspace also loses its confirmation, so it gets no other Dataflow email from the workspace (alerts or deliveries) until it confirms again. The link opens a page with an Unsubscribe button (GET then POST /alerts/unsubscribe?token=…), and mail clients' one-click unsubscribe works too.
Test a channel
curl -X POST https://dataflow.piloterr.com/v1/alert-channels/CHANNEL_ID/test -H "x-api-key: YOUR_API_KEY"The test sends a "Run completed · Test alert from Dataflow" message (data.test: true) and answers {"ok": true} once Slack, Discord or the mail service accepted it, or 502 channel_failed with what they answered. An email channel's test goes to its member and verified recipients only, one email each: with none, the answer is 409 recipients_unconfirmed. When email cannot be sent from Dataflow at all, an email channel's test answers 503 email_not_configured and nothing is sent: it never answers ok for an email nobody receives. A channel takes one test a minute, and a workspace 20 channel tests an hour (429 rate_limited otherwise, with Retry-After). A test does not change the channel's state, does not turn a paused or turned-off channel back on, and does not count for the hourly rule.
GET /v1/alert-channels lists the channels, oldest first, dashboard notifications included. POST /v1/alert-channels/{id}/disable turns one off until you turn it back on (disabled_reason: "manual"): its alerts are not sent nor counted as missed, and projects keep their subscriptions. DELETE /v1/alert-channels/{id} removes one (not the dashboard notifications), with every project's subscription to it: the projects stay as they are, with their other subscriptions, and GET /v1/projects/{id}/alerts no longer lists the channel. Alerts already on their way to it are dropped.
Errors
| Status | Code | Meaning |
|---|---|---|
422 | validation_failed | A missing or wrong field: a URL that is not a Slack or Discord webhook of the channel's type, an email channel without recipients, more than 10 recipients, more than 20 subscriptions, an unknown event, a channel_id that is not one of your channels or is given twice. |
404 | channel_not_found, project_not_found | No such channel or project for your workspace. |
409 | channels_limit | The workspace already has 50 channels (details.max_channels). |
409 | channel_not_removable | Removing the dashboard notifications channel: turn it off instead. |
409 | recipients_unconfirmed | Testing an email channel whose recipients are neither members nor confirmed. |
429 | rate_limited | A test was sent to this channel less than a minute ago, or the workspace sent 20 channel tests this hour. Wait Retry-After seconds. |
429 | confirmation_quota | Creating an email channel whose new addresses would pass the workspace's 50 confirmation emails a day or 100 addresses waiting: nothing was created or sent. |
502 | channel_failed | The test was refused. message has what Slack, Discord or the mail service answered. |
503 | email_not_configured | Testing an email channel while Dataflow cannot send email: nothing was sent. Try again later. |
503 | encryption_unavailable | Channels cannot be added right now: Slack and Discord URLs are stored encrypted, and confirmation links are signed. |