GET Campaign Events
GET /companies/v1/campaigns/{id}/events
This endpoint returns the events associated with a specific campaign.
➤ URL
GET https://back-stg.whalemate.com/api/companies/v1/campaigns/{id}/events
➤ Headers
{
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
➤ Path Params
| Param | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The campaigns's ID |
➤ Filtering
Filters can be applied to the route using the following structure:
filter[filter_name]=value
Each filter corresponds to a specific field and helps refine the query results. Below is an explanation of the available filters:
| Param | Type | Required | Description |
|---|---|---|---|
with_captcha | boolean | No | Excludes events with captcha verification if false is sent |
type | string | No | Filter by event type (open, click, report, fail) |
Example Usage
Multiple filters can be combined in a single request to refine the search results. Example:
filter[with_captcha]=false&filter[type]=open,click
This query will return a list of events without captcha whose type is “open” or “click.”
➤ Types
{
id: integer,
type: string,
timestamp: date,
victim: {
id: integer,
first_name: string,
last_name: string,
email: string,
department: string
}
}[]
➤ Response
Example of successful response (200 OK)
[
{
id: 101,
type: "click",
timestamp: "2025-09-11T12:30:00Z",
victim: {
id: 23,
first_name: "Laura",
last_name: "Pérez",
email: "laura.perez@empresa.com",
department: "IT"
}
}
]
➤ Common Errors
| Code | Message | Couse |
|---|---|---|
| 401 | Unauthorized | API Key invalid or missing |
| 400 | Bad Request | One or more filters have an invalid format |
| 429 | Too Many Requests | The limit of requests was exceeded |
| 500 | Internal Server Error | Unexpected server error |