Ads · Conversions

Send conversion events

Sends conversion events.

POSThttps://api.pozy.ai/v1/ads/conversions
Facebook and Instagram, Google Workspace, TikTok, LinkedIn, Pinterest and RedditsendConversions

Guides: Pinterest Ads, Reddit Ads, ChatGPT Ads

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the ads resource group disabled get 403 resource_group_disabled. Authentication

Request body

application/json, required

  • accountIdstringrequired
  • destinationIdstringrequired
  • eventsarray of objectrequired

    At least 1 item.

    11 child fields
    • eventNamestringrequired
    • eventTimeintegerrequired
    • eventIdstringrequired
    • valuenumber
    • currencystring
    • userobjectrequired
      15 child fields
      • emailstring
      • phonestring
      • firstNamestring
      • lastNamestring
      • externalIdstring
      • ipAddressstring
      • userAgentstring
      • countrystring
      • citystring
      • statestring
      • zipstring
      • dobstring
      • genderstring
      • leadIdstring
      • clickIdsobject
        9 child fields
        • fbcstring
        • fbpstring
        • gclidstring
        • gbraidstring
        • wbraidstring
        • li_fat_idstring
        • epikstring
        • rdt_cidstring
        • rdt_uuidstring
    • itemsarray of object
      5 child fields
      • idstring
      • namestring
      • pricenumber
      • quantityinteger
      • categorystring
    • sourceUrlstring (URL)
    • actionSourcestring

      One of web, app, offline, crm, phone_call, system_generated, business_messaging.

    • messagingobject
      7 child fields
      • channelstringrequired

        One of whatsapp, messenger, instagram_direct.

      • wabaIdstring
      • ctwaClidstring
      • pageIdstring
      • instagramBusinessAccountIdstring
      • pageScopedUserIdstring
      • instagramScopedUserIdstring
    • platformDataobject
  • testCodestring
  • consentobject
    • adUserDatastring

      One of GRANTED, DENIED.

    • adPersonalizationstring

      One of GRANTED, DENIED.

Example

curl -X POST "https://api.pozy.ai/v1/ads/conversions" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "destinationId": "68320031250f5d01a73ce89b",
  "events": [
    {
      "eventName": "Acme",
      "eventTime": 1,
      "eventId": "60c89d0a2e8d4a8ebed77064",
      "user": {
        "email": "alex@example.com",
        "phone": "+14155550123",
        "firstName": "Acme"
      }
    }
  ]
}'

Response

200 on success

  • platformstring

    One of metaads, googleads, linkedinads, tiktokads, openaiads, pinterestads, redditads.

  • eventsReceivedinteger
  • eventsFailedinteger
  • failuresarray of object
    • eventIndexinteger
    • eventIdstring
    • messagestring
    • codestring or integer
    • platformErrorobject
  • traceIdstring
  • testCodestring

    Can be null.

200 response
{
  "platform": "metaads",
  "eventsReceived": 1,
  "eventsFailed": 1,
  "failures": [
    {
      "eventIndex": 1,
      "eventId": "60c89d0a2e8d4a8ebed77064",
      "message": "Hello from Pozy",
      "code": "string",
      "platformError": {}
    }
  ],
  "traceId": "6aa41aeffa864e6ffa88403d",
  "testCode": "string"
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Conversions