Download OpenAPI specification:Download
Customer.io lets you subscribe to reporting webhooks. This page details the events that we report back to your webhook URL.
The App API uses a bearer authentication scheme.
You can generate a bearer token, known as an App API Key, with a defined scope in your account settings. Learn more about bearer authorization in Customer.io.
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
Set up webhooks to inform an external service about Customer.io events. Webhooks can notify you immediately when customer attributes change or when people open your messages.
Log in and go to Data & Integrations > Integrations.
Find and select Reporting Webhooks.
Click Add Reporting Webhook.
Enter the Webhook Endpoint—the URL where you want to receive events. The URL can be either HTTP or HTTPs, but we recommended HTTPS to protect customer information.
Select the events you want to receive.
(Optional) Select the Send Frequency and Body Content options.
Click Save and Enable Webhook.
We have a 4 second timeout for calls to your webhook endpoint. If we don't get a successful (2xx) response during those 4 seconds, we retry the webhook over a period of seven days with an exponential backoff. We backlog subsequent webhook calls and won't continue processing them until the timed-out webhook call returns a successful response or the seven day retry period expires.
If your webhook server responds with any of the following status codes, we'll wait for one hour before we retry the failed call. As with timeouts, we use the same exponential backoff for retries and we'll backlog subsequent webhook calls until the failed call returns a successful response.
400
, 401
, 402
, 403
, 404
, 405
, 410
, 429
, 500
, 502
, 521
.EOF
, server misbehaving
, connect: connection refused
, read: connection reset by peer
, tls: failed to verify certificate: x509:
If you have issues with your webhook server and you want to temporarily block our servers, you can look up the current set of IP addresses we use via this API endpoint.
For security purposes, every email webhook is delivered with an X-CIO-Signature
header. This signature is generated by combining your webhook signing key with the body of webhook request using a standard HMAC-SHA256 hash. You can find the signing key on the Email Activity Webhook integration page in your account settings. (This is the same page where you enter your webhook endpoint.)
To validate a signed request, first you'll need to retrieve the X-CIO-Timestamp
header sent with the webhook request, and the body of the request. Combine the version number, timestamp and body delimited by colons to form a string in the form v0:<timestamp>:<body>
(the version number is always v0
). Using HMAC-SHA256, hash the string using your webhook signing secret as the hash key. Compare this value to the value of the X-CIO-Signature
header sent with the request to confirm that the request originated with Customer.io.
Customer.io sends events to your webhook URL in the following format. Events are generally organized by object_type
—representing the message or Customer.io action (i.e. email
, sms
, etc)—and the specific metric
pertaining to the type (i.e. sent
, bounced
, etc).
x-cio-timestamp required | integer <unix timestamp> The timestamp when the request was sent. |
x-cio-signature required | string A string combining your webhook signing key with the body of webhook request using an HMAC-SHA256 hash, used to help you securely verify requests. |