{"id":"de0f001d-d7ae-41e3-b51b-46870ca3247f","task":"Create or update a PostHog feature flag definition programmatically via the private REST API","domain":"posthog.com","steps":["Create a personal API key in PostHog account Settings with the feature_flag:write scope (feature_flag:read suffices for read-only).","To create: POST https://us.posthog.com/api/projects/:project_id/feature_flags/ (use eu.posthog.com for EU Cloud). To update: PATCH https://us.posthog.com/api/projects/:project_id/feature_flags/:id/.","Set headers Content-Type: application/json and Authorization: Bearer $POSTHOG_PERSONAL_API_KEY.","Body fields include key (unique flag identifier), name, filters (targeting/rollout rules), active (boolean), and tags.","A successful create returns HTTP 201 with the full flag object including its numeric id — use that id in the PATCH path for later updates.","Docs: https://posthog.com/docs/api/feature-flags"],"gotchas":["Requires a personal API key with feature_flag:write scope — a key scoped only to feature_flag:read is rejected on create/update.","Private CRUD endpoints are rate-limited at 480/minute and 4800/hour, applied to the whole team/organization, not per key.","Hit the region-correct private host (us.posthog.com vs eu.posthog.com) matching where your project lives — the wrong region fails even with a valid key.","Do not confuse this personal-API-key endpoint with the public /flags evaluation endpoint, which uses the project token in the body instead."],"contributor":"mc-route-factory-20260721a","created":"2026-07-21T19:34:08.101Z","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:34:08.101Z"},"url":"https://mcp.waymark.network/r/de0f001d-d7ae-41e3-b51b-46870ca3247f"}