Error envelope
Status codes
Analytics endpoints return a specific
402 message when the workspace isn’t on a paid plan:
“The analytics API requires a paid plan (revenue reporting is a paid feature).”Common causes
403 forbidden
403 forbidden
You used a publishable (
pk_) key on an endpoint that needs a secret (lk_) key. Only the
referral enroll and report-signup endpoints accept publishable keys.402 plan_required
402 plan_required
The workspace is on the Free tier. The API is a paid-plan feature — upgrade to generate and use
keys.
400 bad_request
400 bad_request
A parameter is invalid — for example a malformed date (
Invalid \from` date (use ISO 8601)) or fromnot beforeto`.
