Skip to content

Event Tracking API Documentation

NOTICE

The API calls detailed in this document are compatible with Octeth's latest authorization method. You have the option to include either the SessionID or APIKey parameter within the JSON request body.

Track an Event

POST /api/v1/event

This API command is used to track an event. The event can be a page view, a custom event, or an identify event.

Request Body:

NOTICE

This API endpoint accepts raw body in JSON format.

ParameterDescriptionRequired
SessionIDThe user's session ID.Yes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
ListIDThe ID of the list to which the event is associated.Yes
IDThe custom ID associated with the event owner. If this parameter is empty or not provided, the system will generate a unique ID randomly.No
EventThe type of event. Options include: ``.Yes
EmailThe email address of the subscriber.Yes
Properties.*The properties array of the event.No

If the event is set to conversion, following event properties must be set:

  • conversion-id: Ex: "my-order-234"
  • conversion-name: Ex: "purchase"
  • conversion-value: Ex: 290.50

If the event is set to identify, the email parameter is required and the properties array is optional.

json
// Track "test" event
{
  // "SessionID": "{{sessionid}}"
  "APIKey": "{{user_apikey}}",
  "ListID": 94,
  "id": "user-id-2006",
  "event": "test",
  "email": "2006@test.com",
  "properties": {
    "number-of-subscribers-imported": 100
  }
}
json
{
  "status": "success",
  "uuid": "13f8e79a-f063-4b80-10e4-b65a699a2f56",
  "external_id": "user-id-2006",
  "identify_event_sent": true
}
json
{
  "Errors": [
    {
      "Code": 4,
      "Message": "Invalid ListID parameter"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221reserved
4222reserved
4223reserved
4224Invalid ListID parameter
4225Missing event parameter.
4226Missing email parameter.
4227Invalid email parameter.
4228Missing conversion-id event property.
4229Missing conversion-name event property.
42210Missing conversion-value event property.

Retrieve Event Properties Of A List

POST /api/v1/website_events.properties

This API command is used to retrieve the event properties of a list.

Request Body:

NOTICE

This API endpoint accepts raw body in JSON format.

ParameterDescriptionRequired
SessionIDThe user's session ID.Yes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
ListIDThe ID of the list to which the event is associated.Yes
json
{
  // "SessionID":"{{sessionid}}",
  "APIKey": "{{user_apikey}}",
  "ListID": 3
}
json
{
  "ListID": "3",
  "Properties": {
    "identify": [
      "$browser",
      "$browser_language",
      "$browser_version",
      "$current_url",
      "$device",
      "$device_type",
      "$dsn",
      "$host",
      "$id",
      "$lib",
      "$lib_version",
      "$list_id",
      "$os",
      "$pageTitle",
      "$page_title",
      "$pathname",
      "$referrer",
      "$referring_domain",
      "$screen_height",
      "$screen_width",
      "$sent_at",
      "$server",
      "$uuid",
      "$viewport_height",
      "$viewport_width",
      "emailAddress",
      "firstName",
      "lastName",
      "number-of-subscribers-imported"
    ],
    "pageView": [
      "$browser",
      "$browser_language",
      "$browser_version",
      "$current_url",
      "$device",
      "$device_type",
      "$dsn",
      "$host",
      "$lib",
      "$lib_version",
      "$list_id",
      "$os",
      "$pageTitle",
      "$pathname",
      "$referrer",
      "$referring_domain",
      "$screen_height",
      "$screen_width",
      "$sent_at",
      "$server",
      "$uuid",
      "$viewport_height",
      "$viewport_width",
      "url"
    ],
    "test": [
      "$browser",
      "$browser_language",
      "$browser_version",
      "$current_url",
      "$device",
      "$device_type",
      "$dsn",
      "$host",
      "$id",
      "$lib",
      "$lib_version",
      "$list_id",
      "$os",
      "$page_title",
      "$pathname",
      "$referrer",
      "$referring_domain",
      "$screen_height",
      "$screen_width",
      "$sent_at",
      "$server",
      "$uuid",
      "$viewport_height",
      "$viewport_width",
      "number-of-subscribers-imported"
    ]
  }
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "List not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing ListID parameter
4222Invalid ListID parameter
4223List not found

Any questions? Contact us.