Events and payload
The topics a destination can receive, how events are routed, and the JSON payload every destination type gets.
Every destination type receives the same events, as the same JSON payload. Only the envelope differs: an HTTP request for a webhook, a message with attributes or headers for a queue or topic. Each type's guide shows its envelope.
Topics
Every alert event is a topic, with the same data. run.slow is accepted but never sent: it needs a per-project threshold, so it is for alerts only. run.error_rate_exceeded uses the default threshold of 10 %.
One more topic is for destinations only: run.results. At the end of each completed run, it sends the result rows themselves, in batches (below).
An event is only sent when one of your enabled destinations listens to its topic.
Routing
Destinations are chosen per workspace and per topic only. A destination receives every event of its topics, from every project of your workspace, projects created later included: there is no per-project filter. To act on some projects only, filter on the payload's project.id (or project.name) on your side, or add one destination per integration and keep the topics each needs.
When a project's events should reach people, not code, use its alert channels: those are chosen per project and per event.
Payload
Every event has the same shape, version: 1. Each topic's schema, data included, is in the API reference, under Webhooks: every payload is checked against it before it is sent, so what you receive always fits it.
{
"id": "RUN_ID",
"version": 1,
"type": "run.completed",
"occurred_at": "2026-12-01T08:42:10.512Z",
"tenant": { "id": "TENANT_ID", "slug": "acme" },
"project": { "id": "PROJECT_ID", "name": "Enrich companies" },
"run": {
"id": "RUN_ID",
"project_id": "PROJECT_ID",
"status": "completed",
"reason": null,
"trigger": "schedule",
"parent_run_id": null,
"total": 2000,
"done": 2000,
"ok": 1958,
"ko": 42,
"credits": 1958,
"search_credits": 0,
"created_at": "2026-12-01T08:00:01.120Z",
"started_at": "2026-12-01T08:00:02.004Z",
"paused_at": null,
"finished_at": "2026-12-01T08:42:10.401Z",
"duration_ms": 2528397,
"results_expired_at": null,
"eta_seconds": null
},
"data": {
"duration_ms": 2528397,
"export": {
"format": "csv",
"url": "https://dataflow.piloterr.com/exports/…",
"expires_at": "2026-12-02T08:42:10.600Z"
}
},
"url": "https://app.piloterr.com/app/acme/dataflow/runs/RUN_ID"
}| Field | Holds |
|---|---|
id | The event's id: deduplicate on it. A resend keeps it. run.completed uses the run id. |
version | The payload's version, 1. A change that could break your code comes with a new version. |
type | The topic. |
occurred_at | When the event happened. |
tenant | Your workspace: its id and slug. |
project | The project: its id and name. |
run | The run, the same object as GET /v1/runs/{id} returns, as it was when the event was sent; null for events about a project (schedule.skipped, credits.insufficient) and for a test. |
data | What the event adds, as listed in events: reason for run.failed, run.paused, schedule.skipped and a run.cancelled by Piloterr, error for source.unreachable and delivery.failed, required and available (or stage and available) for credits.insufficient, error_rate_pct and threshold_pct for run.error_rate_exceeded, the counts for run.changes_detected… Empty for the others. Its keys are snake_case and never other than the schema's. |
url | The run, or the project, in the dashboard. null for a test. |
run.completed adds data.duration_ms and data.export: a link to the results in the project's first output format (JSON when it has none), valid for the project's export_link_ttl_hours (24 hours by default). It can be revoked, and stops once the run's results are deleted.
Events can arrive more than once and out of order. Deduplicate on id, and order by occurred_at.
run.results
The rows come in as many events as needed to keep each one under 1 MiB:
{
"id": "RUN_ID.results.1",
"version": 1,
"type": "run.results",
"occurred_at": "2026-12-01T08:42:10.512Z",
"tenant": { "id": "TENANT_ID", "slug": "acme" },
"project": { "id": "PROJECT_ID", "name": "Enrich companies" },
"run": { "id": "RUN_ID", "status": "completed", "…": "…" },
"data": {
"batch": 1,
"batches": 3,
"rows": [
{ "row": 0, "input": { "website": "stripe.com" }, "params": { "domain": "stripe.com" }, "status": "ok", "http_status": 200, "duration_ms": 812, "data": { "company_name": "Stripe" } }
]
},
"url": "https://app.piloterr.com/app/acme/dataflow/runs/RUN_ID"
}- The envelope is the run's
run.completedone, with its ownid(RUN_ID.results.1,RUN_ID.results.2…) anddataholding the batch instead of the export link. The rows are the same as in results. - Batches can arrive in any order: use
batchandbatchesto know when you have them all. - A row too big to fit in a batch on its own keeps its
row,status,http_status,duration_msanderror, with emptyinputandparamsand"truncated": true: download the export for the full row. - A retry of failed rows is a run of its own: its
run.resultsholds the rows it retried. A run without any row sends norun.results.
A batch can be close to 1 MiB. Subscribe a queue or topic to run.results only if it accepts messages that big: Azure Service Bus Standard stops at 256 KB, for example. Otherwise, take the rows from the export link of run.completed.
Envelope per type
| Type | Payload in | Event id and topic in |
|---|---|---|
| Webhook | The request body | Headers webhook-id, webhook-topic |
| Amazon SQS | The message body | The metadata message attribute (JSON) |
| Amazon EventBridge | detail.data | detail.metadata; detail-type is the topic |
| Google Cloud Pub/Sub | The message data | Message attributes event-id, topic |
| RabbitMQ | The message body | Headers event-id, topic; the routing key is the topic |
| Kafka | The record value | Record headers event-id, topic; the key is the event id |
| Azure Service Bus | The message body | Application properties event-id, topic |