Skip to main content
GET
/
v1
/
campaigns
/
{id}
/
events
Campaign Event Stream
curl --request GET \
  --url https://api.example.com/v1/campaigns/{id}/events
{
  "data": {
    "events": [
      {
        "id": "<string>",
        "type": "<string>",
        "contact_id": "<string>",
        "email": "<string>",
        "step_id": "<string>",
        "timestamp": "<string>",
        "metadata": {}
      }
    ]
  },
  "meta": {
    "page": 123,
    "per_page": 123,
    "total": 123
  }
}

Request

Path Parameters

id
string
required
The campaign’s unique ID (UUID)

Query Parameters

page
integer
default:"1"
Page number for pagination
per_page
integer
default:"50"
Events per page (max: 100)
type
string
Filter by event type: sent, delivered, opened, clicked, replied, bounced, unsubscribed, complained
contact_id
string
Filter events for a single contact (UUID)
from_date
string
Only events on or after this ISO 8601 timestamp
to_date
string
Only events on or before this ISO 8601 timestamp

Headers

Authorization: Bearer wbk_your_api_key_here
Requires an API key with the campaigns:read permission. Events are retained for 180 days.

Response

data
object
meta
object
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/campaigns/cmp_abc123/events?type=opened&per_page=100" \
  -H "Authorization: Bearer wbk_your_api_key_here"

Example Response

{
  "data": {
    "events": [
      {
        "id": "evt_a1b2c3d4",
        "type": "opened",
        "contact_id": "123e4567-e89b-12d3-a456-426614174000",
        "email": "jane@example.com",
        "step_id": "step_1",
        "timestamp": "2026-04-17T14:23:05Z",
        "metadata": {
          "user_agent": "Mozilla/5.0 ...",
          "ip_country": "DE"
        }
      },
      {
        "id": "evt_b2c3d4e5",
        "type": "clicked",
        "contact_id": "123e4567-e89b-12d3-a456-426614174000",
        "email": "jane@example.com",
        "step_id": "step_1",
        "timestamp": "2026-04-17T14:23:42Z",
        "metadata": {
          "url": "https://leadlex.com/demo"
        }
      }
    ]
  },
  "meta": { "page": 1, "per_page": 100, "total": 2341 }
}

Errors

StatusCodeDescription
400invalid_event_typeUnrecognized type value
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing campaigns:read permission
404campaign_not_foundNo campaign with this ID
429rate_limitedRate limit exceeded