Developer Portal

Webhook delivery

How Impel POSTs events to your endpoint, and how it handles your responses.

Every 30 minutes Impel collects the events created since the last run and POSTs them to your endpoint, oldest first, in batches. One request carries one batch.

The request

POST {your endpoint URL}
Content-Type: application/json
Accept: application/json
x-api-key: {the API key you issued to Impel}
Content-Encoding: gzip

Content-Encoding is only there when gzip is enabled (see below). The body is always sent with a Content-Length, never chunked.

Authentication is an API key only

Impel authenticates with the shared key in the x-api-key header. Requests aren't signed, so there's no signature header to verify. Serve the endpoint over HTTPS and treat the key as a secret.

Compression

Gzip is off unless you ask for it. When it's on, request bodies of 1,024 bytes or more are gzipped and carry Content-Encoding: gzip; smaller ones go uncompressed. If your endpoint answers a gzipped request with 400 or 415, Impel immediately resends the same batch uncompressed.

The envelope

FieldTypePresentDescriptionExample
schema_versionstringAlwaysVersion of this contract. It is the only version marker; individual events don't carry one.1.0
partnerstringAlwaysYour partner identifier, assigned by Impel during onboarding. The same on every request.example_partner
delivery_idstring (uuid)AlwaysIdentifies one delivery run. Every batch sent in the same run, including per-event retries, shares it.3d895e79-b121-4528-a7e6-c1533f9b6023
batch_numberintegerAlwaysPosition of this batch within the run, starting at 1. A batch that is retried event by event repeats its number, and a batch can be skipped, so don't expect a gap-free sequence.1
total_batchesintegerAlwaysNumber of batches the run planned when it started. Fewer can arrive; treat it as informational.3
eventsarrayAlwaysThe events in this batch, oldest first. Each item is told apart by event_type: today message or consumer_created. New event types can be added within this version; skip any you don't recognize.
{
  "schema_version": "1.0",
  "partner": "example_partner",
  "delivery_id": "3d895e79-b121-4528-a7e6-c1533f9b6023",
  "batch_number": 1,
  "total_batches": 1,
  "events": [
    {
      "event_type": "consumer_created",
      "event_timestamp": "2026-09-14T15:02:10Z",
      "event_id": "0dac927e-21ac-57a6-ae5f-450f9e9904d7",
      "client_key": "EXAMPLEDEALER",
      "consumer_key": "CONSUMER-001",
      "consumer": {
        "first_name": "Jane",
        "last_name": "Doe",
        "email_address": "jane.doe@example.com",
        "phone_number": "+15555550123",
        "city": "Anytown",
        "state": "IL",
        "postal_code": "12345"
      },
      "metadata": {
        "source_client_key": "DEALER-001"
      }
    },
    {
      "event_type": "message",
      "event_timestamp": "2026-09-14T15:02:11Z",
      "event_id": "7f6efcd5-3151-5c6f-a502-bd56256b6527",
      "client_key": "EXAMPLEDEALER",
      "consumer_key": "CONSUMER-001",
      "message": {
        "conversation_id": "6cac7467-7e3b-42ba-83bc-dc163a95bb36",
        "opportunity_id": "9dca0816-4fd7-4a80-a238-3d5c5b928c50",
        "source_system": "lead_nurture",
        "direction": "outbound",
        "channel": "sms",
        "sent_by": "AI",
        "sender_contact": "+15555550100",
        "receiver_contact": "+15555550123",
        "body": "Hi, thanks for your interest in the vehicle you asked about. Would Saturday morning work for a test drive?",
        "body_text": "Hi, thanks for your interest in the vehicle you asked about. Would Saturday morning work for a test drive?"
      },
      "metadata": {
        "source_client_key": "DEALER-001"
      }
    },
    {
      "event_type": "message",
      "event_timestamp": "2026-09-14T15:09:47Z",
      "event_id": "540280a6-80dc-536d-87ad-d18a1207c27d",
      "client_key": "EXAMPLEDEALER",
      "consumer_key": "CONSUMER-001",
      "message": {
        "conversation_id": "6cac7467-7e3b-42ba-83bc-dc163a95bb36",
        "opportunity_id": "9dca0816-4fd7-4a80-a238-3d5c5b928c50",
        "source_system": "lead_nurture",
        "direction": "inbound",
        "channel": "sms",
        "sent_by": "Consumer",
        "sender_contact": "+15555550123",
        "receiver_contact": "+15555550100",
        "body": "Saturday at 10 works for me.",
        "body_text": "Saturday at 10 works for me."
      },
      "metadata": {
        "source_client_key": "DEALER-001"
      }
    }
  ]
}

Your response

Any 2xx means the whole batch is delivered. Impel doesn't read the response body.

Answer quickly. Impel waits 5 seconds to connect and 20 seconds for a response, and a timeout counts as a failure. Accept the batch, store it, and process it afterwards.

Anything other than 2xx falls into one of two classes:

ResponseImpel treats it asWhat happens
401, 403, 404, 407, 409, 429, any 5xx, a timeout, or no responseTemporaryRetried on later runs, every 30 minutes, for the retry window agreed at onboarding: at least that many full days after the day the event was created.
Any other status, such as 400, 413 or 422PermanentThe event isn't retried.

A connection that fails outright is retried once within the same run before it counts as no response.

When a batch is rejected

Impel can't tell which event in a batch your endpoint objected to, so it resends the batch one event at a time. Each of those requests is a normal envelope with a single event, the same delivery_id and the same batch_number. Each event that's sent is recorded with its own result. Once one of a consumer's events fails, that consumer's remaining events in the batch aren't sent; they stay pending (see Order is kept per consumer).

If none of the single-event requests succeed, Impel assumes your endpoint is down and stops the run. Events it hadn't attempted yet go out on the next run. There's one exception: if only one event was attempted and it was rejected with a permanent status, Impel treats it as a single bad event and the run continues.

Return 5xx while you're down, never 4xx

Every event keeps the result of its own attempt, even when the run stops. An event your endpoint rejects with a permanent status such as 400 or 422 is never retried, and it holds back that consumer's later events, however healthy your endpoint is afterwards. If you're in maintenance or overloaded, answer 503 (or another 5xx) or 429.

Order is kept per consumer

When one of a consumer's events fails, Impel holds back that consumer's later events instead of letting them overtake it:

  • After a temporary failure, the consumer's events wait and are retried together on the next run.
  • After a permanent failure, or once a temporary failure has used up its retry window, the consumer's later events stay on hold until Impel resolves the problem with you.

Other consumers' events keep flowing. This is why batch_number can skip a number, and why fewer than total_batches batches can arrive.

Things to handle on your side

  • Duplicates. Deduplicate on event_id. Retries, the per-event fallback above, and history files all repeat events by design.
  • Late events. A message can reach you after newer ones, because Impel waits until it can tie the message to a known consumer before sharing it. Sort by event_timestamp, not by arrival. A message Impel never ties to a consumer is never shared.
  • Unknown fields. Ignore fields you don't recognize.
  • New event types and values. Impel can add event types, and new values for fields like source_system and sent_by, without changing schema_version. Skip events whose event_type you don't handle and still return 2xx. Rejecting the batch with a 400 or 422 is a permanent failure and holds back that consumer's later events.
  • Empty runs. A run with nothing new sends no request at all.

Example endpoint

A minimal endpoint that follows this page: it checks x-api-key with a constant-time comparison, decompresses gzipped bodies, skips event types it doesn't handle, deduplicates on event_id, and answers 503 if it can't store a batch, so Impel retries it. Swap the save function and the in-memory set for your own storage. The Bash tab sends the example envelope to your endpoint, so you can test it before go-live.

# Send the example envelope from "The envelope" (saved as envelope.json) to your endpoint.
curl -i https://your-endpoint.example.com/impel/partner-data-share \
  -H "Content-Type: application/json" \
  -H "x-api-key: $IMPEL_API_KEY" \
  --data-binary @envelope.json

# The same batch gzipped, as Impel sends it when compression is enabled.
gzip -c envelope.json | curl -i https://your-endpoint.example.com/impel/partner-data-share \
  -H "Content-Type: application/json" \
  -H "Content-Encoding: gzip" \
  -H "x-api-key: $IMPEL_API_KEY" \
  --data-binary @-

On this page