Record a campaign visit
POST /api/v1/campaigns/visits
Records a public campaign funnel event. Request bodies larger than 8 KB are rejected before validation.
This operation needs no authentication.
Request body
application/json object
event_idstringLength: at most 64 charactersevent_kindstring requiredOne of:"page_view","shell_load","register_click","register_success","register_fail","unsubscribe_click","onboarding_completed"extraobjectslugstring requiredLength: at most 100 charactersua_familystringLength: at most 64 charactersua_osstringLength: at most 64 charactersutm_campaignstringLength: at most 128 charactersutm_contentstringLength: at most 128 charactersutm_mediumstringLength: at most 64 charactersutm_sourcestringLength: at most 64 characters
Generated sample
{
"event_id": "string",
"event_kind": "page_view",
"extra": {},
"slug": "string",
"ua_family": "string",
"ua_os": "string",
"utm_campaign": "string",
"utm_content": "string",
"utm_medium": "string",
"utm_source": "string"
}Responses
201 Visit recorded or idempotent replay accepted.
application/json object
idintegerokbooleanreplayedboolean
Generated sample
{
"id": 0,
"ok": true,
"replayed": true
}413 Request body exceeded 8 KB.
application/json object
errorobject requiredcodestring requiredfieldsobjectOther keys: array of string
messagestring
422 Required event fields failed validation.
application/json object
errorobject requiredcodestring requiredfieldsobjectOther keys: array of string
messagestring
429 Request rate limit exceeded.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string
500 Error response.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.