API reference

The public endpoints, all on https://api.pagebee.ai. Bodies are JSON in UTF-8, timestamps ISO 8601 in UTC, revenue in integer minor units.

Ingest

Method and pathWho calls itAuth
GET /script.jsBrowsersNone
POST /iThe web scriptPublic site key in the body
POST /i/batchThe Swift and Kotlin SDKs, up to 50 eventsPublic site key in the body
POST /v1/eventsYour servers, up to 100 eventsAuthorization: Bearer pb_sk_...

/i and /i/batch always answer 202, even for an unknown key or a filtered bot, so they can't be used to probe keys. They set no cookies. Details of /v1/events are in Server API and Node.

MCP

Method and pathAuth
POST /mcpAuthorization: Bearer pb_ak_...

See MCP for the tools.

Limits

WhatLimit
Browser beacons600 a minute per network
App batches300 a minute per network
Server requests1,200 a minute per secret key
MCP calls120 a minute per key
Beacon body16 KB
App batch body256 KB
Server request body512 KB

Over a limit, the API answers 429 with a Retry-After header. Errors come back as JSON with a code and a message that names the fix.

Keys

PrefixKindWhere it's safe
pb_pk_Public site keyIn your web page or app
pb_sk_Secret ingest keyOn your server only
pb_ak_API and MCP key, read or devOn your machine or server only