Global Event Postback API
Global Event Postback API
POST
https://api.pingtree.com/api/event/global/{org-id}Overview#
The Global Event Postback API fires a conversion or tracking event across all campaigns within an organization using a single endpoint. It is designed for buyers and third-party systems that receive leads from multiple campaigns but want to post conversion data back using one consistent URL — without needing a different endpoint per campaign.
Pingtree resolves the campaign and lead from the transaction_id automatically. No cid is required in the request body.
Endpoint#
POST /api/event/global/{org-id}Replace {org-id} with your organization's unique ID (available in your Pingtree dashboard under account settings).
Authentication#
No token-based authentication header is required. The org-id path parameter scopes the request to your organization.
Request Parameters#
Path Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
org-id | string | Yes | Organization unique ID |
Body Parameters (JSON)#
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id | string | Yes | Unique event identifier as configured in the campaign event settings |
transaction_id | string | Yes | Transaction ID of the lead record to fire the event against |
revenue | number | Conditional | Revenue amount for conversion events |
pid | string | No | Source unique ID (defaults to organic if omitted) |
Example Request#
Bash
curl -X POST "https://api.pingtree.com/api/event/global/org_5f1a2b3c" \
-H "Content-Type: application/json" \
-d '{
"event_id": "sale_completed",
"transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
"revenue": 85.00
}'Non-Conversion Event#
Bash
curl -X POST "https://api.pingtree.com/api/event/global/org_5f1a2b3c" \
-H "Content-Type: application/json" \
-d '{
"event_id": "application_submitted",
"transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456"
}'Example Responses#
Success — Conversion Event Fired#
JSON
{
"status": 200,
"message": "Event triggered successfully",
"data": {
"cid": "cmp_9z8y7x6w",
"pid": "src_abc123",
"transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
"conversion_id": "conv_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"conversion": true
}
}Success — Tracking Event Fired#
JSON
{
"status": 200,
"message": "Event triggered successfully",
"data": {
"cid": "cmp_9z8y7x6w",
"pid": "src_abc123",
"transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
"conversion_id": "",
"conversion": false
}
}Error — Missing Event ID#
JSON
{
"status": 400,
"message": "event_id is required"
}Error — Missing Transaction ID#
JSON
{
"status": 400,
"message": "transaction_id is required"
}Error — Lead Not Found#
JSON
{
"status": 400,
"message": "No lead found for the provided transaction_id in this organization"
}Error — Invalid Event ID#
JSON
{
"status": 400,
"message": "Invalid event_id — event not configured for the associated campaign"
}Error — Duplicate Event#
JSON
{
"status": 400,
"message": "Duplicate event for this transaction_id"
}Status Codes#
| HTTP Code | Description |
|---|---|
| 200 | Event fired successfully |
| 400 | Missing or invalid event_id, transaction_id, or revenue |
| 403 | Source inactive or concurrent event lock in progress |
| 500 | Internal server error |
Comparison with Campaign-Specific Event Postback#
| Feature | Global Event Postback | Campaign Event Postback |
|---|---|---|
| Endpoint | /api/event/global/{org-id} | /api/event/trigger |
Requires cid | No | Yes |
| Scope | All campaigns in the organization | Single campaign |
| Ideal for | Buyers posting back across multiple campaigns | Campaign-specific event tracking |
| Authentication | org-id in path | cid in request body |
Tips#
- Preferred endpoint for buyers. If you are a buyer receiving leads from multiple campaigns within the same organization, use this global endpoint to avoid managing per-campaign event URLs.
- Event ID must exist in the matched campaign. Even though you do not pass a
cid, Pingtree resolves the campaign from thetransaction_id. Theevent_idmust be configured in that campaign's event settings. - Revenue is required for conversion events. If the matched event is a conversion type, omitting
revenuereturns a 400 error. - Deduplication. If the campaign event has duplicate conversion disabled, sending the same
event_id+transaction_ida second time returns a 400 duplicate error. - Postback URL format. When configuring this as a server-to-server postback URL in a third-party platform, use a template like:
https://api.pingtree.com/api/event/global/org_5f1a2b3c?event_id=sale_completed&transaction_id={transaction_id}&revenue={payout}