Skip to main content
POST
Report what your site showed: rendered searches, lists, impressions, clicks, profile views

Authorizations

x-api-key
string
header
required

API key minted in the MarketBox dashboard. Scope is restricted to the projects you select at creation time. Every route needs the key's standard API access (*) except POST /v1/projects/{projectId}/events, which needs events:write; a key without * is refused with 403 CAPABILITY_NOT_GRANTED.

Headers

x-mb-session-key
string

Default sessionKey for every event in the batch that has none: an opaque per-session key you hash yourself, at most 64 characters. A longer value is ignored, never an error.

Path Parameters

projectId
string
required

The project (tenant) that owns the resource. Every resource in this API is scoped to a project, and your API key is restricted to the projects it was issued for — a project outside that scope returns 403.

Minimum string length: 1
Example:

"prj_01kv60qgnef2kt3pvqgwmkbzfr"

Body

application/json

The batch of events

events
object[]
required

The events, at most 500 per request (and 256 KB in all). Each is validated on its own.

Required array length: 1 - 500 elements

One site event. type picks the shape: opportunity, impression, click, profile_view, coverage_miss or search.rendered. An element that does not match its shape is rejected on its own in the 202 body, never the whole batch.

Example:

Response

The batch was read: what was accepted and what was not

accepted
integer
required

Events accepted and recorded. accepted + rejected.length is the number sent. When nothing could be recorded the answer is 503, not 202, so retry on it.

Example:

41

duplicates
integer
required

Always 0 for now. A repeated eventId is accepted and counted once by the rollup, so a retry never double-counts; this field will report what the rollup collapsed.

Example:

0

rejected
object[]
required

The events not accepted, in batch order. Fix and resend only these.