Ads · Tracking Tags
Updates a conversion event. Fields you leave out keep their current values.
https://api.pozy.ai/v1/accounts/{accountId}/tracking-tags/{tagId}/events/{eventId}Guide: Pixels and tracking tags
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
Path parameters
| Name | Type | Notes |
|---|---|---|
accountIdrequired | string | |
tagIdrequired | string | |
eventIdrequired | string |
Request body
application/json, required
adAccountIdstringnamestring1 to 200 characters.
typestringsiteEventstringOne of
page_view,view_content,add_to_cart,search,initiate_checkout,add_payment_info,purchase.enabledbooleandefaultValuenumberAt least 0.
currencystringclickWindowDaysinteger1 to 365.
viewWindowDaysinteger0 to 365.
urlContainsstring1 to 500 characters.
Example
curl -X PATCH "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/tracking-tags/697ae8efd24020381023ee99/events/60c89d0a2e8d4a8ebed77064" \
-H "Authorization: Bearer $POZY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adAccountId": "666219aad7bab67ace411e4f",
"name": "Acme",
"type": "string",
"siteEvent": "page_view"
}'const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/tracking-tags/697ae8efd24020381023ee99/events/60c89d0a2e8d4a8ebed77064", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POZY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
adAccountId: "666219aad7bab67ace411e4f",
name: "Acme",
type: "string",
siteEvent: "page_view"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.patch(
"https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/tracking-tags/697ae8efd24020381023ee99/events/60c89d0a2e8d4a8ebed77064",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
json={
"adAccountId": "666219aad7bab67ace411e4f",
"name": "Acme",
"type": "string",
"siteEvent": "page_view",
},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
200 on success
platformstringeventobject14 child fields
idstringrequirednamestringrequiredtypestringsiteEventstringOne of
page_view,view_content,add_to_cart,search,initiate_checkout,add_payment_info,purchase.siteEventIdstringstatusstringdefaultValuenumbercurrencystringclickWindowDaysintegerviewWindowDaysintegerurlContainsstringalwaysUseDefaultValuebooleanprimarybooleancountingTypestringOne of
one,every.
{
"platform": "instagram",
"event": {
"id": "6bfebd43ddc270f6d2c56fc5",
"name": "Acme",
"type": "string",
"siteEvent": "page_view",
"siteEventId": "6a036e72b4645cc9fc4fed0b",
"status": "active",
"defaultValue": 12.5,
"currency": "USD",
"clickWindowDays": 1,
"viewWindowDays": 1,
"urlContains": "https://pozy.ai/media/example-1.jpg",
"alwaysUseDefaultValue": true,
"primary": true,
"countingType": "one"
}
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is read-only, scoped to other profiles, or has this resource group disabled. |
| 404 | not_found | Nothing with that id exists in your workspace. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.