Connecting Customer.io
Wiring your own sending workspace, the seven buyer messages and their variables, and what delivery guarantees you get
The engine sends nothing by default. It has no sending identity of its own — no from-address, no domain, no template library — and it will never mail one of your buyers on a whim. Every message that ever goes out comes from your Customer.io workspace, using your credentials, against a template you wrote.
An organizer with no provider connection is not "suppressed". It is never considered at all.
That has a consequence worth stating plainly before you build anything: if you connect nothing, buyers get nothing. Ticket delivery is your job until you wire it up here.
What works today. You can connect a provider, store credentials, wire all seven message types, and read it all back — that surface is shipped and stable. What fires. Messages are triggered by activities from orders, waitlists and refunds. A correct connection sends only when one of those activities is recorded; it never sends on a timer or from a configuration change.
In the dashboard, the Notifications page does the same: connect the workspace (the key is write-only, so replacing it means pasting a new one), then turn on and map the messages you want. It is optional. If you send your own email from the webhook feed, leave it empty.
The connection
One connection per organizer, at a singleton endpoint. PATCH creates it the
first time and updates it thereafter.
curl -X PATCH https://tickets.lissen.com/api/v1/notification_provider \
-H "Authorization: Bearer tk_test_..." \
-H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
-H "Idempotency-Key: 9f3a1c07-2b64-4de1-8c05-7a1e4d9b0f21" \
-H "Content-Type: application/json" \
-d '{
"kind": "customerio",
"credentials": {
"app_api_key": "…your Customer.io App API key…",
"region": "eu"
},
"messages": {
"order_confirmation": {
"enabled": true,
"provider_message_ref": "42"
}
}
}'{
"id": "np_0199c4ea-6d22-7b18-8e05-3f9a4c2d1b70",
"kind": "customerio",
"credentials_configured": true,
"messages": {
"order_confirmation": {
"enabled": true,
"provider_message_ref": "42",
"enabled_at": "2026-11-14T18:11:04Z"
}
},
"metadata": {}
}| Field | Notes |
|---|---|
kind | customerio is the only value today. Optional on the first connect. |
credentials.app_api_key | Your Customer.io App API key — the transactional-send credential, for your own workspace. |
credentials.region | eu or us. Defaults to eu. Customer.io's two stacks have different hostnames, so this must match your workspace. |
messages | The wiring map. See below. |
metadata | Yours. Stored and echoed back, never interpreted. |
A 200 here validates nothing about your Customer.io setup. The engine
never calls your workspace at write time: it does not check your API key, it
does not check the region, and it does not check that any
provider_message_ref names a real template. These checks happen when a
message is sent. Send yourself a test transactional message from Customer.io's
own tooling to prove the workspace side works.
Credentials are write-only
A credential you send here is never returned by any endpoint. It is
encrypted at rest and the read image carries credentials_configured: true
instead. There is no field on the response for it to appear in, and none on the
activity snapshot either.
A lost key is replaced, not recovered: PATCH a new credentials object and
the old one is overwritten. Sending credentials is required on the very first
connect, and optional on every update after it.
Reading the connection back:
GET/v1/notification_providercurl https://tickets.lissen.com/api/v1/notification_provider \
-H "Authorization: Bearer tk_test_..." \
-H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"Before you have ever connected, this is a 404 not_found. That is the
correct answer, not an error to work around.
The wiring map
messages maps each message type to a template in your workspace:
{
"messages": {
"order_confirmation": { "enabled": true, "provider_message_ref": "42" },
"refund_confirmation": { "enabled": true, "provider_message_ref": "51" },
"waitlist_joined": { "enabled": false, "provider_message_ref": "58" }
}
}provider_message_refis your Customer.io transactional message id. It is opaque to the engine — we never validate it, at write time or ever. A typo is stored happily and surfaces only as a failed delivery. Check it yourself.enabledis the switch.falseand absent mean exactly the same thing: silent.
Suppression is omission
There is deliberately no suppression flag, no mute list, and no global
"sending enabled" switch. A message type is eligible if and only if it is
present, enabled, and carries a provider_message_ref. Anything else is
silence.
A second mechanism would have to be kept in sync with the first one, and the day they disagreed you would not be able to tell whether a missing email was policy or a bug.
If you send your own order confirmations
If your product sends every order confirmation itself, say so on your
organizer, and the engine will never map order_confirmation for it:
curl -X PATCH https://tickets.lissen.com/api/v1/organizer \
-H "Authorization: Bearer tk_test_..." \
-H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
-H "Content-Type: application/json" \
-d '{ "own_order_confirmation": true }'While own_order_confirmation is true, a wiring that enables
order_confirmation is a 400 invalid_request with param
messages.order_confirmation, so nobody can wire it by mistake and send your
buyers a second email. Every other message type wires as before. It is not a
second switch: the wiring map is still the only thing that decides what the
engine sends, and the setting only keeps that one message out of it.
Setting it while order_confirmation is enabled in your wiring is a 400
invalid_request with param own_order_confirmation: unwire it first.
Setting it back to false lets you map it again. It is false until you set
it, and GET /v1/organizer reads it.
Sending messages replaces the whole map. It is not a per-key merge. If
you PATCH messages containing only order_confirmation, every other
message type is dropped and goes silent. Read the connection, change the key
you mean, and send the whole map back. Omitting messages entirely leaves
the existing wiring untouched.
Eligible is not the same as sent
Wiring is the first gate, not the only one. A message goes out only when all of these hold:
- The message type is present, enabled, and has a
provider_message_ref. - The triggering activity happened after that type's
enabled_at, after the connection was created, and recently enough to be inside the retry horizon below. - Any extra condition on the trigger passes —
payment_failure_followup, for instance, only applies to a position revoked because a payment bounced. - Every field the message cannot do its job without is present, and a recipient address can be resolved.
- The deployment is allowed to mail that address (see the environment rule).
- The engine wins the send claim, so duplicate workers cannot race the same
attempt, and a sender of your own that claimed the message first keeps it
(see sending a message yourself). An
unacknowledged attempt is never re-sent; acknowledged
408,429, and5xxfailures may be attempted again.
enabled_at, and why nothing is retro-sent
When you switch a message type on, the engine stamps enabled_at on it.
Delivery is floored on that timestamp, so turning a message type on today
never mails buyers from yesterday.
enabled_at is engine-computed and never accepted from a caller. If a
partner could backdate it, they could mail buyers who were deliberately not
being mailed.
Two behaviours follow:
- Switching a type off and on again re-stamps
enabled_atto now. The gap is never filled in afterwards. - Changing only the
provider_message_refon a type that is already on keeps the originalenabled_at. Fixing a typo does not reset your history.
The seven message types
Each type is triggered by exactly one activity. This is the whole v1 catalog — transactional consequences of a buyer's own action, and nothing else. The engine will not send marketing on your behalf, ever.
| Message type | Fires on | Sent to | Trigger ships with |
|---|---|---|---|
order_confirmation | An order is issued | The order's buyer | orders & issuance |
payment_failure_followup | A position is revoked because a payment bounced | The buyer on that order | orders & issuance |
waitlist_invitation | A waitlist entry is promoted | The entry's own address | waitlist |
refund_confirmation | A refund completes, unless it refunds a membership payment | The buyer on that order | refunds & disputes |
waitlist_joined | Someone joins a waitlist | The entry's own address | waitlist |
waitlist_rejected | An organizer rejects a waitlist request | The entry's own address | waitlist |
event_cancelled | A cancelled event's policy switched on Notify attendees: one request per order with tickets | The buyer on that order | event cancellation |
Revocations caused by a refund or a dispute never produce a
payment_failure_followup — those are the refund message's business, and the
engine filters them out before anything is planned.
Writing the templates
Customer.io exposes the data of an API-triggered transactional message under
the trigger namespace. Every variable is therefore {{trigger.order_id}}
— a bare {{order_id}} renders blank, silently, which is the kind of
failure nobody notices until a buyer receives an empty email.
The one exception is loop variables: inside
{% for position in trigger.positions %} the item is plain
{{position.description}}.
Two rules hold across all seven:
- Required means the message is not sent without it. Its absence is a permanent failure, recorded and abandoned. That is deliberate: an order confirmation with no tickets on it, or a refund confirmation with no amount, is a wrong email rather than a degraded one, and you would rather send nothing.
- Optional fields are omitted entirely when absent, not sent as
null. So{% if trigger.buyer_name %}behaves the way you expect.
The event object, where present, is
{ id, name, starts_at, timezone, venue_name, venue_address }. Every member is
an optional string, passed through as the engine holds it — starts_at is
normally an RFC 3339 UTC timestamp and timezone an IANA name such as
Europe/London, but neither is validated before the message is built, so guard
both in the template.
order_confirmation
Fires on issuance, not settlement. A buyer paying by a slow method holds valid tickets before the money clears, and a zero-total order, including a comp, rides this same message — so the copy should say the tickets are issued, never that the payment succeeded.
| Variable | Type | Required |
|---|---|---|
trigger.order_id | string, ord_ + UUID | yes |
trigger.currency | three-uppercase-letter currency string | yes |
trigger.total_minor | integer, minor units | yes |
trigger.positions | non-empty array of objects | yes |
trigger.positions[].id | string, pos_ + UUID | yes |
trigger.positions[].description | non-empty string | yes |
trigger.positions[].admission_code | non-empty string | yes |
trigger.positions[].qr_image_url | URL of the code as a PNG (see positions) | no |
trigger.positions[].price_minor | integer, minor units | no |
trigger.buyer_name | string | no |
trigger.booking_fee_minor | integer, minor units | no |
trigger.event | event object | no |
admission_code is the door's credential and re-renders the same QR every
time. This payload is secret-bearing: a rendered copy of this email should
not be forwarded casually or logged.
payment_failure_followup
| Variable | Type | Required |
|---|---|---|
trigger.position_id | string, pos_ + UUID | yes |
trigger.order_id | string, ord_ + UUID | yes |
trigger.buyer_name | string | no |
trigger.description | string — the item name as it was at issuance | no |
trigger.item_id | optional string | no |
trigger.revoked_at | optional string | no |
trigger.event | event object | no |
There is no re-purchase variable: put your own purchase URL in the template.
waitlist_invitation
Capacity is being held for this person, and the hold expires. The deadline is the whole content of the message.
| Variable | Type | Required |
|---|---|---|
trigger.waitlist_entry_id | string, wl_ + UUID | yes |
trigger.invitation_expires_at | RFC 3339 string with offset | yes |
trigger.checkout_url | absolute URL string | yes |
trigger.name | string | no |
trigger.item_id | optional string | no |
trigger.event | event object | no |
refund_confirmation
Engine refunds and refunds you take from your own Stripe Dashboard ride the
same message: the buyer does not care which console it was pressed in. The one
exception is a refund of a membership payment (a refund with
membership_charge_id set, from the engine or the Dashboard), which sends no
message. A
money_only refund does not change admission status, so branch your copy on
trigger.revokes_admission rather than telling the buyer their ticket is
cancelled. It describes only this refund: an earlier refund may already have
revoked the tickets.
A free ticket cancellation sends
this message too, with trigger.amount_minor equal to 0 and
trigger.revokes_admission equal to true. For a zero-amount cancellation,
confirm that the selected tickets are no longer valid without promising money
or a bank settlement. Update any template you already have wired to handle
this case.
| Variable | Type | Required |
|---|---|---|
trigger.refund_id | string, rfd_ + UUID | yes |
trigger.order_id | string, ord_ + UUID | yes |
trigger.currency | three-uppercase-letter currency string | yes |
trigger.amount_minor | integer, minor units | yes |
trigger.buyer_name | string | no |
trigger.position_ids | array of strings | no |
trigger.refund_type | refund_and_revoke or money_only | yes |
trigger.revokes_admission | boolean, false for money_only | yes |
Avoid promising a settlement date in the copy: when the money lands is the bank's business, not ours.
waitlist_joined
| Variable | Type | Required |
|---|---|---|
trigger.waitlist_entry_id | string, wl_ + UUID | yes |
trigger.name | string | no |
trigger.item_id | optional string | no |
trigger.event | event object | no |
trigger.requires_approval | boolean | no |
trigger.quantity | integer | no |
There is deliberately no queue position: the engine does not publish one.
trigger.requires_approval is true when the item is approval-gated: the buyer
asked for a place and the organizer decides, so word it as a request sent
rather than a place in a queue. waitlist_invitation carries the same two
fields; on an approval-gated item it is the approval of a request with
something to pay.
waitlist_rejected
| Variable | Type | Required |
|---|---|---|
trigger.waitlist_entry_id | string, wl_ + UUID | yes |
trigger.name | string | no |
trigger.item_id | optional string | no |
trigger.requires_approval | boolean | no |
trigger.quantity | integer | no |
trigger.event | event object | no |
The engine records no reason for a rejection, so the message has none to give. Keep it short, and do not promise another chance.
event_cancelled
| Variable | Type | Required |
|---|---|---|
trigger.cancellation_id | string, ecn_ + UUID | yes |
trigger.order_id | string, ord_ + UUID | yes |
trigger.buyer_name | string | no |
trigger.event | event object (name is required) | yes |
trigger.refunds_tickets | boolean | no (false when absent) |
trigger.refund_amount_minor | integer, minor units refunded to this order so far | no |
trigger.currency | ISO 4217 code | no |
trigger.admission_disabled | boolean | no (false when absent) |
trigger.cancelled_at | ISO timestamp | no |
The message says what the cancelled event's policy does and no more. When
refunds_tickets is true the money is on its way back to the original payment
(the amount appears once the refund exists); when admission_disabled is true
the tickets will not be accepted at the door, and when it is false they still
are. The organizer's cancellation reason is an internal note and is never in the
payload.
A minimal template
Subject: Your tickets{% if trigger.event.name %} for {{trigger.event.name}}{% endif %}
Hi{% if trigger.buyer_name %} {{trigger.buyer_name}}{% endif %},
Your tickets are issued. Order reference: {{trigger.order_id}}
{% for position in trigger.positions %}
- {{position.description}}
{% if position.qr_image_url %}<img src="{{position.qr_image_url}}" width="132" height="132" alt="Admission QR code">{% endif %}
Admission code: {{position.admission_code}}
{% endfor %}
Order total: £{{trigger.total_minor | divided_by: 100.0}}That divided_by: 100.0 is only correct for two-decimal currencies. It is
written for a GBP-only workspace. Minor units do not always divide by 100 —
JPY has no minor unit at all and KWD has three decimal places, so the same
filter would show a ¥5,000 order as ¥50.00. If you sell in more than one
currency, branch on {{trigger.currency}} or use your provider's own
currency formatting rather than dividing inline.
Delivery semantics
What you are promised, and what you are not:
- Retries run for about six hours, then stop. The horizon is measured from the activity, not from the first attempt, so a burst of fast failures cannot quietly redefine it. Past the deadline the message is abandoned. Human messages cannot arrive days late — a waitlist invitation that turns up after its window has closed is hostile, not helpful.
- A failure your provider actually answered is retried when it is worth
retrying. A
408or429is retried, and so is any5xx. Every other4xxis a rejection we stop on.425 Too Earlycounts as a rejection, because replaying a send your provider may already have processed is exactly the duplicate we refuse to risk. - A no-answer provider call is not sent again. Transport failures trigger worker backoff, but the send claim remains held. A retry within the claim window steps aside instead of calling the provider again. Once that window expires, the stale-claim pass records the outcome as ambiguous and stops. The engine cannot tell whether the first call delivered the message; the activity remains available for deliberate follow-up.
- A message missing a required field is never half-sent. It is recorded as a permanent failure naming the field that was missing.
- Delivery records are kept for about thirty days. They are operational records, not an audit trail; the activity is the durable one.
The outcomes, in one table:
| What happened | What we do |
|---|---|
| Provider accepted it | Done. One send, never repeated. |
Provider answered 408, 429 or 5xx | Retry, until the six-hour horizon. |
Provider answered any other 4xx (including 425) | Stop. Treated as a rejection. |
| No answer at all — connection failed mid-call | Worker backoff retains the claim; no provider resend. Terminalized as ambiguous after the claim window. |
| A required field was missing | Stop, recorded as a permanent failure. |
| Six hours elapsed with no success | Stop, recorded as given up. |
| The deployment may not mail this address | Stop, recorded as suppressed. |
Non-production deployments cannot mail a real buyer
Outside production, the engine will only deliver to a small internal allowlist of Lissen staff addresses. Every other recipient is recorded as suppressed and stopped there — never retried, and never delivered.
This is a property of the deployment, not of your organizer. A test organizer in production mails normally; any organizer in a preview or local deployment does not. If you are wondering why a message did not arrive, the first question is which environment produced it.
Where an activity's messages stand
To see whether the engine sends the messages an activity triggers, and how far each send got, read the activity's notifications:
GET/v1/activities/{id}/notificationscurl https://tickets.lissen.com/api/v1/activities/act_0199c4f1-2a3b-7c4d-8e5f-6a7b8c9d0e1f/notifications \
-H "Authorization: Bearer tk_test_..." \
-H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"{
"data": [
{
"message_type": "refund_confirmation",
"eligible": true,
"state": "settled",
"outcome": "sent",
"sender": "engine"
}
]
}There is one entry per message type the activity's type triggers (see
the seven message types); an activity that
triggers none answers an empty list, and another organizer's activity is a
404 not_found.
| Field | Notes |
|---|---|
eligible | Whether the engine sends this message for this activity: the type is wired, and the activity was created at or after both the connection and the type's enabled_at. The retry horizon and the trigger's own condition are checked when the engine sends, not here. Once false for an activity it stays false, since switching the type on again stamps a later enabled_at. |
state | none: not tried yet, or the provider refused the last try and it may be tried again. An eligible message reads none until the engine plans it, within about a minute. in_flight: a send holds its claim, from just before the provider call until its outcome is recorded. settled: finished, never tried again. |
outcome | Once settled: sent, permanent_failure, gave_up, ambiguous or suppressed_nonprod (the outcomes in the table above). Otherwise null. More values may be added. |
sender | Who holds the claim while in_flight, or recorded the outcome once settled: engine, or organizer for a sender of your own (below). null while none. More values may be added. |
The answer never includes a recipient, a payload or the provider's error
text. Send records are kept for about thirty days, so an older activity
reads none. To see whether an email reached the inbox, use Customer.io's
own delivery logs, and the activity stream for
the fact that triggered it.
Sending a message yourself
A sender of your own can take a message over from the engine, or hand it back, without dropping or doubling one: it claims each send in the same attempt log the engine claims in, before it calls its provider. Whichever claims first sends; the engine steps aside for a message you have claimed, and you must not send one the engine holds or has settled.
First read the activity's notifications. The message is yours to send when
eligible is false and state is none. While it is eligible, or
in_flight with sender engine, look again later: the engine is sending
it.
Then claim it, before you call your provider:
POST/v1/activities/{id}/notifications/claimcurl -X POST https://tickets.lissen.com/api/v1/activities/act_0199c4f1-2a3b-7c4d-8e5f-6a7b8c9d0e1f/notifications/claim \
-H "Authorization: Bearer tk_test_..." \
-H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
-H "Content-Type: application/json" \
-d '{ "message_type": "refund_confirmation" }'{
"message_type": "refund_confirmation",
"status": "claimed",
"claim_id": "4182",
"sender": "organizer",
"outcome": null
}Send it only when status is claimed. in_flight means a claim is held,
by sender: the engine's (wait for it, as above) or your own from an earlier
try (that try may have sent it: check your provider's delivery log).
settled means it is finished with outcome. Claiming does not consult the
wiring: the read decides whether the message should be yours.
Then call your provider, and settle the claim with what happened. The answer is the message's state afterwards, as in the read above.
POST/v1/activities/{id}/notifications/settlecurl -X POST https://tickets.lissen.com/api/v1/activities/act_0199c4f1-2a3b-7c4d-8e5f-6a7b8c9d0e1f/notifications/settle \
-H "Authorization: Bearer tk_test_..." \
-H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
-H "Content-Type: application/json" \
-d '{ "message_type": "refund_confirmation", "claim_id": "4182", "result": "sent", "provider_message_id": "dlv_7Hq2" }'result | When | Then |
|---|---|---|
sent | Your provider accepted the message. Send its delivery id as provider_message_id. | Settled sent. Nobody sends it again. |
released | It definitely did not: your provider refused it, or the connection never opened. | The claim is given back, so a later claim, yours or the engine's, may send it. |
ambiguous | You cannot tell: a timeout, a 5xx, an answer without a delivery id. | Settled ambiguous. Nobody sends it again; check your provider's delivery log. |
A claim not settled within about ten minutes is recorded ambiguous, as the
engine's own are, and never sent again. Settling a claim that is no longer
yours (already settled or given back, recorded ambiguous, or the engine's)
is a 409 notification_claim_not_held and changes nothing: read the
message's state instead. If the answer to a claim is lost, retrying it reads
your own claim in_flight; do not send then, since you cannot know whether
the lost claim went on to call your provider.
Handing a message type over is then one PATCH of the wiring: unmap it, and
every message the engine has not claimed by then is yours; map it again, and
messages from that moment are the engine's, while older ones stay yours.
What emits on the activity stream
notification_provider.created— the first time you connect.notification_provider.updated— every successfulPATCHafter that, whether or not the values actually changed.
The snapshot on both carries the connection's kind,
credentials_configured, the wiring map and your metadata. It has no field
for credentials at all, so there is nothing to redact and nothing that can be
forgotten.
Individual sends do not emit activities. The activity that triggered the message is the record of what happened.
Stable error codes
| Code | Status | Type | What it means | What to do |
|---|---|---|---|---|
invalid_request | 400 | invalid_request_error | The request body or query failed validation. `param` names the field. | Fix the named field and send the request again. |
not_found | 404 | invalid_request_error | No such object under this organizer. An object belonging to another tenant reads as absent, never as forbidden. | Check the id and the organizer header. |
notification_claim_not_held | 409 | invalid_request_error | The `claim_id` you settled is not a claim your own sender holds on that activity's message: it was already settled or given back, it was recorded `ambiguous` after the claim window, or it is the engine's. Nothing changed. | Read `GET /v1/activities/{id}/notifications` for where the message stands, and never send it again on that claim. A retried settlement whose first answer was lost lands here too: the state shows what it recorded. |
idempotency_key_reused | 409 | idempotency_error | This key was already used with a different request body. Fingerprints cover method, path, sorted query pairs and the exact request bytes. | Use a fresh key for a genuinely different request, or resend the original bytes to replay the original response. |
idempotency_key_in_flight | 409 | idempotency_error | An identical request under the same key is still executing. This is the only concurrency case that 409s. | Wait and retry; the first attempt will finish or release the key. |
internal_error | 500 | api_error | Something failed on our side. | Retry. If it persists, send us the `request_id` from the response — it identifies the exact request in our logs. |
You will meet invalid_request for: connecting with no credentials; changing
kind without supplying new credentials; a credential bundle that does not
match the declared kind; a messages key that is not one of the seven
message types; enabling order_confirmation on an organizer that sends its
own; claiming a message the activity's type does not trigger; and a
provider_message_id settled with a result other than sent. param names
the offender.
A mistyped message type is a 400 rather than being quietly stripped: silently
dropping it would be indistinguishable from the silence you actually asked for.
Reads are more forgiving in the other direction — a wiring key written by a
newer version of the engine is dropped from the response rather than turning
your GET into a 500.
internal_error here includes the deliberate refusal to store a credential
when it cannot be stored securely. We fail closed rather than keep your secret
in the clear.
Gotchas
PATCH messagesreplaces the map. The single most common way to accidentally turn off four message types is to send one.- Send an
Idempotency-Key. It is optional on this endpoint, but without one a retriedPATCHruns again and emits a secondnotification_provider.updated— noise on your feed for a call you only meant to make once. - Nothing about your Customer.io workspace is checked at write time. A wrong key, a wrong region or a wrong message ref all store cleanly.
regionmust match your workspace. Aneukey against theusstack authenticates against nothing.- Enabling a type does not backfill. If you connect a week after going live, the first week's buyers are not mailed.
- Wiring all seven does not backfill old activities. A message is sent only for an eligible activity recorded after that message type was enabled. Check the provider delivery logs when a current trigger does not arrive.