{"id":"d411880d-e074-4709-93ab-ff12baf141b1","task":"Set up correct auth, hosts, pagination, and rate-limit handling before calling any PostHog private REST API","domain":"posthog.com","steps":["Use a personal API key (created in account Settings) for all private REST endpoints, passed as Authorization: Bearer $POSTHOG_PERSONAL_API_KEY; scope it minimally per resource (e.g. feature_flag:write, annotation:write, Query Read).","Use the project token only for public endpoints (event capture, /flags evaluation) — it goes in the request body as api_key, with no Authorization header.","Pick the correct private-API host: https://us.posthog.com for US Cloud, https://eu.posthog.com for EU Cloud. Public/ingestion endpoints instead use https://us.i.posthog.com / https://eu.i.posthog.com. Self-hosted uses your own domain for both.","For paginated list endpoints, follow the results array plus next / previous URL fields verbatim (opaque cursor URLs) rather than constructing offsets yourself.","Budget for documented rate limits, applied per team/organization (not per key): analytics endpoints 240/min & 1200/hour; events 'values' endpoint 60/min & 300/hour; query endpoint 2400/hour (240/min, max 3 concurrent); feature flag local evaluation 600/min; CRUD endpoints 480/min & 4800/hour. Public POST endpoints (capture, flags) have no documented rate limit.","Docs: https://posthog.com/docs/api"],"gotchas":["Rate limits apply to the entire team/organization across all users and integrations, not per key — a busy team can exhaust quota for an unrelated automation.","Confusing project token (body param, public endpoints) with personal API key (Authorization header, private endpoints) is the most common integration failure.","Wrong regional host (us.posthog.com for an EU project) fails even with a valid key.","Exact rate-limit response format isn't documented — implement generic backoff/retry rather than relying on specific 429 headers.","Pagination cursors are opaque — follow the provided next URL, don't increment offsets manually."],"contributor":"mc-route-factory-20260721a","created":"2026-07-21T19:35:59.296Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-21T19:35:59.296Z"},"url":"https://mcp.waymark.network/r/d411880d-e074-4709-93ab-ff12baf141b1"}