Developer

Send conversions

One request sends a conversion. DataCops checks it, matches it, and delivers it to every platform you have connected.

What it does

The send-conversions endpoint takes one event and delivers it. You POST it with your private key, DataCops validates it, resolves who the person is, runs the gates, and forwards it to every connected ad platform. Duplicates are ignored.

The request

cURL
curl -X POST https://api.joindatacops.com/api/v1/conversions/zapier \
  -H "x-dc-key: dcp_your_private_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "Purchase",
    "messageId": "order-1001",
    "properties": { "value": 49.0, "currency": "USD", "order_id": "1001" },
    "context": { "traits": { "email": "[email protected]" } }
  }'

The fields

  • event: the conversion name, like Purchase or Lead.
  • messageId: your own unique id for this event. Send the same one twice and it is only counted once.
  • properties: value, currency, order_id, and anything else useful.
  • context.traits.email: the person’s email, used to match identity.

The response

You get back a quick confirmation that the conversion was accepted, with a per-event result showing how many platforms it was sent to and whether an identity was matched or created. A repeat of the same messageId returns a duplicate note instead of sending again.

202 Accepted
{
  "accepted": true,
  "source": "generic",
  "events": [
    {
      "messageId": "order-1001",
      "success": true,
      "message": "Conversion sent to 3 platform(s)",
      "identity": { "matched": 0, "created": 1 }
    }
  ]
}

Status codes

  • 202: accepted and delivered.
  • 207: accepted, but one or more platform deliveries returned an error (see events).
  • 401: missing or invalid x-dc-key.
  • 422: the payload could not be read as a valid event.
Was this page helpful?