Skip to content
Sign in Create account

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_id string
    Length: at most 64 characters
  • event_kind string required
    One of: "page_view", "shell_load", "register_click", "register_success", "register_fail", "unsubscribe_click", "onboarding_completed"
  • extra object
  • slug string required
    Length: at most 100 characters
  • ua_family string
    Length: at most 64 characters
  • ua_os string
    Length: at most 64 characters
  • utm_campaign string
    Length: at most 128 characters
  • utm_content string
    Length: at most 128 characters
  • utm_medium string
    Length: at most 64 characters
  • utm_source string
    Length: 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

  • id integer
  • ok boolean
  • replayed boolean

Generated sample

{
  "id": 0,
  "ok": true,
  "replayed": true
}
413 Request body exceeded 8 KB.

application/json object

  • error object required
    • code string required
    • fields object

      Other keys: array of string

    • message string
422 Required event fields failed validation.

application/json object

  • error object required
    • code string required
    • fields object

      Other keys: array of string

    • message string
429 Request rate limit exceeded.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string

500 Error response.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.