POST
/api/v1/utm-templatesCreate a UTM template
Creates a new reusable UTM parameter template. Workspaces are limited to 50 templates.
Authorization
Authorizationstringheaderrequired
Bearer token. Format: Bearer YOUR_API_KEY
Body
namestringbodyrequired
Human-readable label for this template. Max 100 characters.
sourcestringbodyrequired
UTM source parameter, e.g. newsletter, google. Max 200 characters.
mediumstringbodyrequired
UTM medium parameter, e.g. email, cpc. Max 200 characters.
campaignstringbodyrequired
UTM campaign name. Max 200 characters.
termstringbodyoptional
UTM term — typically for paid search keywords. Optional. Max 200 characters.
contentstringbodyoptional
UTM content — for differentiating ad creatives. Optional. Max 200 characters.
curl -X POST https://app.brevr.io/api/v1/utm-templates \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Email Newsletter",
"source": "newsletter",
"medium": "email",
"campaign": "weekly-digest"
}'{
"template": {
"id": "utm_abc123",
"workspaceId": "ws_xyz",
"name": "Email Newsletter",
"source": "newsletter",
"medium": "email",
"campaign": "weekly-digest",
"term": null,
"content": null,
"createdAt": "2024-06-01T10:00:00.000Z",
"updatedAt": "2024-06-01T10:00:00.000Z"
}
}Last updated on