post
https://partner.gupshup.io/partner/app//conversions/event
Push conversion events for a WhatsApp app via the dataset associated with its WABA.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Rate limit:
500 requests per 60 seconds.
Request Example:
curl --location '{{BASE_URL}}/partner/app/{{APP_ID}}/conversions/event' \
--header 'Authorization: Bearer {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"data": [
{
"event_name": "Purchase",
"event_time": 1675999999,
"action_source": "business_messaging",
"messaging_channel": "whatsapp",
"user_data": {
"whatsapp_business_account_id": {{WABA_ID}},
"ctwa_clid": "{{CTWA_CLID}}"
},
"custom_data": {
"currency": "USD",
"value": 123
}
}
],
"partner_agent": "{{PARTNER_NAME}}"
}'Response
| Status Code | Response | Comments |
|---|---|---|
| Success | ||
| 200 | See below | Upstream success |
| Error | ||
| 400 | See below | Validation / business error (portal or WASS) |
| 401 | See below | Missing or invalid Partner App token |
| 403 | See below | Caller lacks PARTNER_APP |
| 429 | See below | Rate limit exceeded |
| 4xx / 5xx | Upstream body | Non-success from WASS is passed through |
| 500 | See below | Unexpected portal failure |
Success — 200
{
"events_received": 1,
"fbtrace_id": "AYZhpp4scrUfVIWcEWJ7NmN",
"messages": [],
"status": "success"
}Error — 400 (examples from Self Serve)
| Scenario | Response body |
|---|---|
| Invalid app details | {"message": "Invalid app details", "status": "error"} |
| No WABA associated | {"message": "No WABA Associated", "status": "error"} |
| App not on CAPI | {"message": "This feature is supported only for CAPI", "status": "error"} |
| Missing data list | {"message": "data list is required", "status": "error"} |
| Missing user_data | {"message": "user_data is required", "status": "error"} |
| Missing ctwa_clid | {"message": "ctwa_clid is required", "status": "error"} |
| Invalid / missing WABA ID in payload | {"message": "WABA ID is either empty or invalid", "status": "error"} |
| Invalid messaging_channel | {"message": "messaging_channel must be whatsapp", "status": "error"} |
| Missing event_name | {"message": "event_name is required", "status": "error"} |
| Incorrect event_time | {"message": "event_time is incorrect", "status": "error"} |
| Missing action_source | {"message": "action_source is required", "status": "error"} |
| Missing partner_agent | {"message": "partner_agent is required", "status": "error"} |
| Unknown app / no API key (portal) | {"status": "error", "message": "Invalid App Details"} |
Error — 401
{
"status": "error",
"message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
}Error — 429
{
"status": "error",
"message": "Too Many Requests"
}Error — 500
{
"status": "error",
"message": "Unable to push conversions event for app id: {{APP_ID}}"
}Request parameters
| Key | Description | Data type | Required | Constraints |
|---|---|---|---|---|
| Path | ||||
| appId | Partner / WhatsApp app id | String | Required | App must belong to the authenticated partner |
| Headers | ||||
| Authorization | Partner App token | String | Required | Bearer {{PARTNER_APP_TOKEN}} with PARTNER_APP |
| Content-Type | Media type | String | Required | application/json |
| Body (JSON) | ||||
| data | List of conversion events | Array | Required | Validated upstream |
| data[].event_name | Event name (e.g. Purchase) | String | Required | |
| data[].event_time | Unix timestamp | Number | Required | |
| data[].action_source | Action source | String | Required | e.g. business_messaging |
| data[].messaging_channel | Channel | String | Required | Must be whatsapp |
| data[].user_data | User identifiers | Object | Required | Must include matching WABA id + ctwa_clid |
| data[].user_data.whatsapp_business_account_id | WABA id | Number / String | Required | Must match app WABA |
| data[].user_data.ctwa_clid | Click-to-WhatsApp click id | String | Required | |
| data[].custom_data | Optional custom fields | Object | Optional | e.g. currency, value |
| partner_agent | Partner / agent name | String | Required |
