> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Conversions

Send purchases, leads and sign-ups to the Nextdoor Conversions API from your backend, matched by the ndclid or hashed email and counted once with the Nextdoor pixel.

`POST /v1/events` sends your conversions to the Nextdoor Conversions API. The destination is the connection's pixel ID.

## Send a conversion event

Name the Nextdoor Ads connection and its pixel ID. Send the `ndclid` of the ad click when you have it, and the same `eventId` your Nextdoor pixel sends:

```bash
curl -X POST "https://zernio.com/api/v1/events" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "66a1f0c2a4b9d3e8f1a2b3c4",
    "destinations": [{ "accountId": "66b2e19d8c3f5a7e9d0b1c2d", "destinationId": "5b0b9e9a-156a-11ee-be56-0242ac120002" }],
    "events": [{
      "eventName": "Purchase",
      "eventTime": '"$(date +%s)"',
      "eventId": "order_12345",
      "value": 25.00,
      "currency": "USD",
      "sourceUrl": "https://shop.example.com/thank-you",
      "user": {
        "email": "ana@example.com",
        "ipAddress": "203.0.113.7",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
        "clickIds": { "ndclid": "123e4567-e89b-12d3-a456-426614174000" }
      }
    }]
  }'
```

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

## Match keys

Nextdoor needs at least one of these on each event. Zernio refuses an event with none of them.

- `user.clickIds.ndclid`: Nextdoor adds `ndclid` to the landing URL of each ad click. Keep it from the landing page and send it with the conversion.
- `user.email`: hashed with SHA-256 after trimming and lowercasing.
- `user.phone`: a US number, hashed as its ten digits without the country code. A number from another country is left out.

The Zernio site tag does not capture `ndclid` yet, so site events reach Nextdoor only for visitors whose email or phone the tag knows.

## Event names

Zernio maps the standard names to Nextdoor's events:

| `eventName` | Nextdoor event |
|---|---|
| `Purchase` | `purchase` |
| `Lead` | `lead` |
| `CompleteRegistration` | `sign_up` |
| `AddToCart` | `add_to_cart` |
| `InitiateCheckout` | `initiate_checkout` |
| `PageView` | `page_view` |
| `Search` | `search` |
| `ViewContent` | `view_content` |
| `AddToWishlist` | `add_to_wishlist` |
| `Subscribe` | `subscribe` |

Nextdoor's own `custom_conversion_1` to `custom_conversion_10` go as is. Any other name is refused. Rename an event in the forwarding rule when yours is named otherwise.

## What else is sent

Nextdoor takes the person's details hashed with SHA-256, so Zernio normalizes and hashes them:

- `firstName` and `lastName`, lowercased. `dob` as `YYYYMMDD`, `gender` as `f` or `m`, and `externalId`.
- `city` lowercased without spaces, `state` as its two-letter code, `zip` as its first five digits, `country` as its two-letter code.
- `ipAddress` as `client_ip_address` and `userAgent` as `client_user_agent`, not hashed.
- `eventId` as `event_id`, `eventTime` as `event_time_epoch` in seconds, and the pixel ID as `data_source_id`.
- `value` and `currency` as `order_value`, such as `USD25`. A `Purchase` needs both.
- Items with an `id` as `product_context`, and the order id as `order_id`. An offline event without an order id sends its `eventId`, since Nextdoor requires one.
- A web event with its `sourceUrl` and `userAgent` goes as `website`, with the URL as `action_source_url`. Without them it goes as `other`.

Every other click id is not sent.

## Dedup with the Nextdoor pixel

Nextdoor counts an event once when the pixel and the Conversions API send it with the same `event_id` for the same pixel.

Send the same `eventId` your pixel sends for the event, and you can keep both running.

## Consent

- Outside the EEA, UK and Switzerland, without `adUserData` consent the email, phone, name and address are left out: only the click id, IP address and user agent are sent.
- Without `adPersonalization` consent the event goes with `delivery_optimization` off, so Nextdoor uses it for measurement only.
- 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).

## Test mode

An event sent with `testCode` goes to Nextdoor as a test event, with the code as `test_event`.

## How it behaves

- One request per event, five at a time.
- A `429` is retried. A `5xx` or no answer is not: Nextdoor documents dedup only between its pixel and the API, so a repeat could count twice.
- A `401` or `403` on every event means Nextdoor refused the token: the send fails with `reconnect_required`.
- Nextdoor cannot take a refund or a change back, so a retracted event stays counted there.

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `Nextdoor needs the click id …` | No `ndclid`, email or US phone | Send the `ndclid` from the landing URL, or the person's email. |
| `Nextdoor takes Purchase, …` | The event name has no Nextdoor event | Rename it in a forwarding rule. |
| `Nextdoor needs the value and currency of a purchase.` | A `Purchase` without `value` or `currency` | Send both. |
| `Nextdoor 400` | Nextdoor refused the payload, often without a reason | Check the event has a name Nextdoor takes, a match key and, on a purchase, its value and currency. |
| `destinationId must be this connection's Nextdoor pixel ID` | Another id was sent | Use the id from `GET /v1/ads/conversions/destinations`. |
| `401` with `reconnect_required` | Nextdoor refused the token, or the connection has none | Check that Nextdoor approved access, generate a new token and [connect again](/platforms/nextdoor-ads/connect). |

## Related

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