Skip to main content
POST
/
external
/
v1
/
businesses
/
{business_id}
/
conversion_events
Conversion Reporting
curl --request POST \
  --url https://api.example.com/external/v1/businesses/{business_id}/conversion_events \
  --header 'Content-Type: application/json' \
  --data '
{
  "cnct_tracking_id": "<string>",
  "event_name": "<string>",
  "sendout_id": "<string>",
  "attribution": {
    "attribution.meta_ctwa.ctwa_clid": "<string>",
    "attribution.meta_ctwa.ad_id": "<string>"
  },
  "payload": {
    "payload.currency": "<string>",
    "payload.value": 123,
    "payload.order_id": "<string>",
    "payload.content_type": "<string>",
    "payload.content_ids": [
      "<string>"
    ],
    "payload.num_items": 123,
    "payload.contents": [
      {
        "id": "<string>",
        "quantity": 123,
        "item_price": 123
      }
    ],
    "payload.event_time": 123
  }
}
'
When a customer clicks a Click-to-WhatsApp (CTWA) ad and later purchases on your site, Connectly can forward that conversion event to Meta’s Conversions API on your behalf β€” so the originating ad gets credit in Ads Manager. You send the event to Connectly; you never need to talk to Meta directly.

Endpoint

POST https://api.connectly.ai/external/v1/businesses/{business_id}/conversion_events

Integration journey

1

Get your API key

Open the Connectly inbox β†’ Settings β†’ General β†’ API Key. Create a new key with all scopes unchecked (full access) or reuse an existing one if you still have the plaintext. The key is shown only once β€” copy and store it securely. Never expose it client-side or commit it to source control.
2

Enable purchase tracking in your campaign

In the Flow Builder, open the Audience step of your Click-to-WhatsApp card and tick β€œTrack purchases completed on my own site and report them to the Ads Manager”. Without this, carousel CTA links will not carry the required tracking parameters.
3

Capture tracking parameters at landing

Once your campaign sends, Connectly auto-appends five query parameters to every CTA link:
?cnct_tracking_id=<value>&sendout_id=<value>&ctwa_clid=<value>&ad_id=<value>&attribution_source=meta_ctwa
Persist all five values when the customer lands on your site β€” store them in the session or against the customer record β€” so they’re available at checkout.
4

Call the conversion endpoint on purchase

When the customer completes a purchase, POST a single conversion event to Connectly with the tracking parameters captured at landing.
5

Verify in Ads Manager

Connectly forwards the event to Meta. Conversions typically appear in Meta Events Manager and roll up into Ads Manager attribution within a few hours.

Request body

Top-level fields

cnct_tracking_id
string
required
Verbatim copy of the cnct_tracking_id query parameter from the landing URL. Identifies the originating WhatsApp/CTWA session at the customer level.
event_name
string
required
Meta CAPI event name. Accepted values: "Purchase" or "ViewContent". Any other value returns 400 INVALID_ARGUMENT.
sendout_id
string
required
Verbatim copy of the sendout_id query parameter from the landing URL. Credits the conversion to the correct Connectly campaign.
attribution
object
required
CTWA attribution data.
payload
object
required
Per-event detail. For Purchase, currency and value are required.

Example request

curl -i -X POST "https://api.connectly.ai/external/v1/businesses/<BUSINESS_ID>/conversion_events" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: <YOUR_API_KEY>" \
  -d '{
    "cnct_tracking_id": "<value from URL>",
    "event_name": "Purchase",
    "sendout_id": "<value from URL>",
    "attribution": {
      "meta_ctwa": {
        "ctwa_clid": "<value from URL>",
        "ad_id": "<value from URL>"
      }
    },
    "payload": {
      "currency": "USD",
      "value": 99.97,
      "order_id": "ORD-7821",
      "content_type": "product",
      "content_ids": ["sku-1", "sku-2"],
      "num_items": 2,
      "contents": [
        { "id": "sku-1", "quantity": 1, "item_price": 49.99 },
        { "id": "sku-2", "quantity": 1, "item_price": 49.98 }
      ],
      "event_time": 1746480000
    }
  }'

Response

{ "events_received": 1 }
events_received: 1 confirms Connectly received and recorded the event. Connectly logs the conversion to your campaign analytics regardless of whether the Meta CAPI forward succeeds. If Meta rejects the event, you receive a non-200 response with Meta’s verbatim error message.

Error responses

HTTP statusWhen
400 INVALID_ARGUMENTMissing or invalid required fields; missing currency/value for a Purchase event; unsupported event_name; or Meta rejected the forwarded event.
401 UnauthenticatedMissing or invalid X-API-KEY.
404 NOT_FOUNDBusiness not found, or the business has no WhatsApp Cloud channel configured.

Notes

Send one event per API call. For multi-item orders, include all items in the contents[] array within a single Purchase event β€” do not send multiple POST requests for the same order.
  • cnct_tracking_id, sendout_id, ctwa_clid, and ad_id must be captured from the landing page URL at visit time and passed back when the customer converts β€” which may happen later in the same session.
  • Set event_time to the actual order timestamp, not the time you call the API. This matters if you flush events in batches or run backfills.
  • order_id doubles as Meta’s dedup key β€” keep it stable per order so retries are safe.
1

Get your API key

Open the Connectly inbox β†’ Settings β†’ General β†’ API Key. Create a new key with all scopes unchecked (full access) or reuse an existing one if you still have the plaintext. The key is shown only once β€” copy and store it securely. Never expose it client-side or commit it to source control.
2

Enable purchase tracking in your campaign

In the Flow Builder, open the Audience step of your Click-to-WhatsApp card and tick β€œTrack purchases completed on my own site and report them to the Ads Manager”. Without this, carousel CTA links will not carry the required tracking parameters.
3

Capture tracking parameters at landing

Once your campaign sends, Connectly auto-appends five query parameters to every CTA link:
?cnct_tracking_id=<value>&sendout_id=<value>&ctwa_clid=<value>&ad_id=<value>&attribution_source=meta_ctwa
Persist all five values when the customer lands on your site β€” store them in the session or against the customer record β€” so they’re available at checkout.
4

Call the conversion endpoint on purchase

When the customer completes a purchase, POST a single conversion event to Connectly with the tracking parameters captured at landing.
5

Verify in Ads Manager

Connectly forwards the event to Meta. Conversions typically appear in Meta Events Manager and roll up into Ads Manager attribution within a few hours.

Request body

cnct_tracking_id
string
required
Verbatim copy of the cnct_tracking_id query parameter from the landing URL. Identifies the originating WhatsApp/CTWA session at the customer level.
event_name
string
required
Meta CAPI event name. Accepted values: "Purchase" or "ViewContent". Any other value returns 400 INVALID_ARGUMENT.
sendout_id
string
required
Verbatim copy of the sendout_id query parameter from the landing URL. Credits the conversion to the correct Connectly campaign.
attribution
object
required
CTWA attribution data.
payload
object
required
Per-event detail. For Purchase, currency and value are required.

curl -i -X POST "https://api.connectly.ai/external/v1/businesses/<BUSINESS_ID>/conversion_events" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: <YOUR_API_KEY>" \
  -d '{
    "cnct_tracking_id": "<value from URL>",
    "event_name": "Purchase",
    "sendout_id": "<value from URL>",
    "attribution": {
      "meta_ctwa": {
        "ctwa_clid": "<value from URL>",
        "ad_id": "<value from URL>"
      }
    },
    "payload": {
      "currency": "USD",
      "value": 99.97,
      "order_id": "ORD-7821",
      "content_type": "product",
      "content_ids": ["sku-1", "sku-2"],
      "num_items": 2,
      "contents": [
        { "id": "sku-1", "quantity": 1, "item_price": 49.99 },
        { "id": "sku-2", "quantity": 1, "item_price": 49.98 }
      ],
      "event_time": 1746480000
    }
  }'
events_received: 1 confirms Connectly received and recorded the event. Connectly logs the conversion to your campaign analytics regardless of whether the Meta CAPI forward succeeds. If Meta rejects the event, you receive a non-200 response with Meta’s verbatim error message.

Error responses

HTTP statusWhen
400 INVALID_ARGUMENTMissing or invalid required fields; missing currency/value for a Purchase event; unsupported event_name; or Meta rejected the forwarded event.
401 UnauthenticatedMissing or invalid X-API-KEY.
404 NOT_FOUNDBusiness not found, or the business has no WhatsApp Cloud channel configured.

Send one event per API call. For multi-item orders, include all items in the contents[] array within a single Purchase event β€” do not send multiple POST requests for the same order.
  • cnct_tracking_id, sendout_id, ctwa_clid, and ad_id must be captured from the landing page URL at visit time and passed back when the customer converts β€” which may happen later in the same session.
  • Set event_time to the actual order timestamp, not the time you call the API. This matters if you flush events in batches or run backfills.
  • order_id doubles as Meta’s dedup key β€” keep it stable per order so retries are safe.
1

Get your API key

Open the Connectly inbox β†’ Settings β†’ General β†’ API Key. Create a new key with all scopes unchecked (full access) or reuse an existing one if you still have the plaintext. The key is shown only once β€” copy and store it securely. Never expose it client-side or commit it to source control.
2

Enable purchase tracking in your campaign

In the Flow Builder, open the Audience step of your Click-to-WhatsApp card and tick β€œTrack purchases completed on my own site and report them to the Ads Manager”. Without this, carousel CTA links will not carry the required tracking parameters.
3

Capture tracking parameters at landing

Once your campaign sends, Connectly auto-appends five query parameters to every CTA link:
?cnct_tracking_id=<value>&sendout_id=<value>&ctwa_clid=<value>&ad_id=<value>&attribution_source=meta_ctwa
Persist all five values when the customer lands on your site β€” store them in the session or against the customer record β€” so they’re available at checkout.
4

Call the conversion endpoint on purchase

When the customer completes a purchase, POST a single conversion event to Connectly with the tracking parameters captured at landing.
5

Verify in Ads Manager

Connectly forwards the event to Meta. Conversions typically appear in Meta Events Manager and roll up into Ads Manager attribution within a few hours.

Request body

cnct_tracking_id
string
required
Verbatim copy of the cnct_tracking_id query parameter from the landing URL. Identifies the originating WhatsApp/CTWA session at the customer level.
event_name
string
required
Meta CAPI event name. Accepted values: "Purchase" or "ViewContent". Any other value returns 400 INVALID_ARGUMENT.
sendout_id
string
required
Verbatim copy of the sendout_id query parameter from the landing URL. Credits the conversion to the correct Connectly campaign.
attribution
object
required
CTWA attribution data.
payload
object
required
Per-event detail. For Purchase, currency and value are required.

curl -i -X POST "https://api.connectly.ai/external/v1/businesses/<BUSINESS_ID>/conversion_events" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: <YOUR_API_KEY>" \
  -d '{
    "cnct_tracking_id": "<value from URL>",
    "event_name": "Purchase",
    "sendout_id": "<value from URL>",
    "attribution": {
      "meta_ctwa": {
        "ctwa_clid": "<value from URL>",
        "ad_id": "<value from URL>"
      }
    },
    "payload": {
      "currency": "USD",
      "value": 99.97,
      "order_id": "ORD-7821",
      "content_type": "product",
      "content_ids": ["sku-1", "sku-2"],
      "num_items": 2,
      "contents": [
        { "id": "sku-1", "quantity": 1, "item_price": 49.99 },
        { "id": "sku-2", "quantity": 1, "item_price": 49.98 }
      ],
      "event_time": 1746480000
    }
  }'
events_received: 1 confirms Connectly received and recorded the event. Connectly logs the conversion to your campaign analytics regardless of whether the Meta CAPI forward succeeds. If Meta rejects the event, you receive a non-200 response with Meta’s verbatim error message.

Error responses

HTTP statusWhen
400 INVALID_ARGUMENTMissing or invalid required fields; missing currency/value for a Purchase event; unsupported event_name; or Meta rejected the forwarded event.
401 UnauthenticatedMissing or invalid X-API-KEY.
404 NOT_FOUNDBusiness not found, or the business has no WhatsApp Cloud channel configured.

Send one event per API call. For multi-item orders, include all items in the contents[] array within a single Purchase event β€” do not send multiple POST requests for the same order.
  • cnct_tracking_id, sendout_id, ctwa_clid, and ad_id must be captured from the landing page URL at visit time and passed back when the customer converts β€” which may happen later in the same session.
  • Set event_time to the actual order timestamp, not the time you call the API. This matters if you flush events in batches or run backfills.
  • order_id doubles as Meta’s dedup key β€” keep it stable per order so retries are safe.