# Conversions

Send purchases, carts, product views and custom events to Attentive from your backend, for its Journeys and segments.

`POST /v1/events` sends your events to Attentive. The destination is the connection's Attentive company id.

## Send a conversion event

Name the Attentive account and its company id as the destination. Attentive texts and emails your customers, so it needs the phone or email as typed:

```bash
curl -X POST "https://zernio.com/api/v1/events" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "PROFILE_ID",
    "destinations": [{ "accountId": "ACCOUNT_ID", "destinationId": "ATTENTIVE_COMPANY_ID" }],
    "events": [{
      "eventName": "Purchase",
      "eventTime": 1798804800,
      "eventId": "order_12345",
      "currency": "USD",
      "items": [{ "id": "SKU-1", "name": "Tee", "price": 25.99, "quantity": 1 }],
      "user": { "phone": "+14155550123", "email": "customer@example.com" }
    }]
  }'
```

To send every event to Attentive without naming it each time, create a [forwarding rule](/conversions/create-forwarding-rule) for the account instead.

## Event names

| Zernio event | Sent to Attentive as |
|--------------|----------------------|
| `Purchase` with priced `items` | eCommerce purchase |
| `AddToCart` with priced `items` | eCommerce add to cart |
| `ViewContent` with priced `items` | eCommerce product view |
| Any other event, or these without priced items | Custom event, under the event's own name |

An item counts as priced when it has an `id` and a `price`. Items without them are left out of the eCommerce event.

## Match keys

Each event needs at least one of these, unhashed:

| Field | How it is sent |
|-------|----------------|
| `user.phone` | In E.164. It needs its country code (`+` or `00`); a national number is left out |
| `user.email` | As typed, lowercased. A hashed address is left out |
| `user.externalId` | As `clientUserId` |

## What else is sent

- eCommerce events carry the items, with `currency` (`USD` when you send none). A purchase carries `platformData.order_id`, or else `eventId`, as its order id.
- Custom events carry `value`, `currency`, `sourceUrl` and your `platformData` fields as properties, and `eventId` as `externalEventId`.

## Consent

- An event whose `consent.adUserData` is `DENIED` is not sent: every Attentive event names the person.
- On profiles created since 22 November 2026, an event from the EEA, UK or Switzerland is sent only with `adUserData` granted and no ad signal denied. See [Consent](/products/server-side-tracking/consent).

## How it behaves

- One request per event, five at a time.
- Custom events dedup on `eventId`. eCommerce events carry no event id, so Zernio does not send again one Attentive left unanswered: a repeated cart could text the shopper twice.
- Attentive has no test mode. A request with `testCode` is refused.

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `Attentive needs an unhashed email, a phone with its country code (+...), or an external id.` | No usable match key | Send the phone or email as typed, or an external id. |
| `Attentive event names cannot contain quotes, brackets, braces, backslashes, pipes or commas.` | A custom event name uses one of those characters | Rename the event. |
| `The visitor did not consent to sharing their data, …` | `adUserData` is `DENIED` | Nothing to fix: the event is not sent. |
| `Attentive has no test mode: …` | The request has a `testCode` | Drop `testCode`. |
| `destinationId must be this connection's Attentive company id` | Another id was sent | Use the id from `GET /v1/ads/conversions/destinations`. |
| `401` with `reconnect_required` | Attentive refused the saved key | [Connect again](/platforms/attentive/connect) with a fresh key. |

## Related

- [Send events](/conversions/send-events)
- [Create a forwarding rule](/conversions/create-forwarding-rule)
- [Consent](/products/server-side-tracking/consent)
- [Limits and errors](/platforms/attentive/reference)