Events API¶
Ingest Events¶
Send a batch of events for monitoring.
Authentication: X-API-Key header
Rate limit: 1,000 requests/minute
Request Body¶
JSON array of event objects:
[
{
"source": "backend",
"event_type": "purchase",
"data": {
"transaction_id": "TXN-001",
"value": 99.99,
"currency": "USD"
}
},
{
"source": "backend",
"event_type": "signup",
"data": {
"user_id": "usr_abc123",
"plan": "pro"
}
}
]
| Field | Type | Required | Description |
|---|---|---|---|
source |
string | Yes | Source identifier (e.g. gtm, backend, website) |
event_type |
string | Yes | Event type identifier (e.g. purchase, page_view, error) |
data |
object | Yes | Arbitrary event payload with the fields you want to monitor |
Response¶
201 Created
Error Responses¶
| Status | Body | Cause |
|---|---|---|
401 Unauthorized |
{"detail": "Invalid or missing API key"} |
Missing or invalid X-API-Key header |
403 Forbidden |
{"detail": "Domain not allowed"} |
Request origin not in your allowed domains |
422 Unprocessable Entity |
{"detail": "..."} |
Invalid request body (missing required fields) |
429 Too Many Requests |
{"detail": "Rate limit exceeded"} |
More than 1,000 requests/minute |
Examples¶
const events = [
{
source: "frontend",
event_type: "page_view",
data: { page: "/checkout", referrer: "/cart" }
}
];
const response = await fetch("https://api.getadwize.com/api/v1/events", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify(events)
});
const result = await response.json();
console.log(result); // { ingested: 1 }
List Events¶
Retrieve stored events with optional filters.
Authentication: X-API-Key header or session cookie
Query Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
source |
string | — | Filter by source |
event_type |
string | — | Filter by event type |
skip |
integer | 0 | Pagination offset |
limit |
integer | 100 | Page size (max 1,000) |
Response¶
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"source": "gtm",
"event_type": "purchase",
"data": { "transaction_id": "TXN-001", "value": 99.99 },
"created_at": "2026-02-11T14:00:00Z"
}
]
Examples¶
Get Event Types¶
Returns distinct event types seen in your data.
Authentication: X-API-Key header or session cookie
Response¶
Get Event Sources¶
Returns distinct source identifiers.
Authentication: X-API-Key header or session cookie
Response¶
Pixel-Based Collection¶
A lightweight endpoint used by the Google Tag Manager integration. Events are sent as query parameters in an image pixel request.
Rate limit: 2,000 requests/minute
Query Parameters¶
| Parameter | Type | Description |
|---|---|---|
k |
string | Your API key |
d |
string | Base64-encoded event data |
This endpoint returns a 1x1 transparent GIF. It is designed for browser-side collection via <img> tags and is used internally by the Adwize GTM template. For server-side integrations, use POST /events instead.
See the Google Tag Manager integration for setup details.