naftiko: 1.0.0-alpha2 info: label: PostHog API — environments description: 'PostHog API — environments. 23 operations. Lead operation: environments. Self-contained Naftiko capability covering one Posthog business surface.' tags: - Posthog - environments created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: POSTHOG_API_KEY: POSTHOG_API_KEY capability: consumes: - type: http namespace: posthog-environments baseUri: '' description: PostHog API — environments business capability. Self-contained, no shared references. resources: - name: api-projects-project_id-environments path: /api/projects/{project_id}/environments/ operations: - name: environmentslist method: GET description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: limit in: query type: integer description: Number of results to return per page. - name: offset in: query type: integer description: The initial index from which to return the results. - name: environmentscreate method: POST description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id path: /api/projects/{project_id}/environments/{id}/ operations: - name: environmentsretrieve method: GET description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: environmentsupdate method: PUT description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: environmentspartialupdate method: PATCH description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: environmentsdestroy method: DELETE description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: api-projects-project_id-environments-id-activity path: /api/projects/{project_id}/environments/{id}/activity/ operations: - name: environmentsactivityretrieve method: GET description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: api-projects-project_id-environments-id-add_product_intent path: /api/projects/{project_id}/environments/{id}/add_product_intent/ operations: - name: environmentsaddproductintentpartialupdate method: PATCH description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-complete_product_onboarding path: /api/projects/{project_id}/environments/{id}/complete_product_onboarding/ operations: - name: environmentscompleteproductonboardingpartialupdate method: PATCH description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-default_evaluation_contexts path: /api/projects/{project_id}/environments/{id}/default_evaluation_contexts/ operations: - name: environmentsdefaultevaluationcontextsretrieve method: GET description: Manage default evaluation contexts for a team. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: environmentsdefaultevaluationcontextscreate method: POST description: Manage default evaluation contexts for a team. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: environmentsdefaultevaluationcontextsdestroy method: DELETE description: Manage default evaluation contexts for a team. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: api-projects-project_id-environments-id-default_release_conditions path: /api/projects/{project_id}/environments/{id}/default_release_conditions/ operations: - name: environmentsdefaultreleaseconditionsretrieve method: GET description: Manage default release conditions for new feature flags in this team. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: environmentsdefaultreleaseconditionsupdate method: PUT description: Manage default release conditions for new feature flags in this team. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-delete_secret_token_backup path: /api/projects/{project_id}/environments/{id}/delete_secret_token_backup/ operations: - name: environmentsdeletesecrettokenbackuppartialupdate method: PATCH description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-event_ingestion_restrictions path: /api/projects/{project_id}/environments/{id}/event_ingestion_restrictions/ operations: - name: environmentseventingestionrestrictionsretrieve method: GET description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: api-projects-project_id-environments-id-experiments_config path: /api/projects/{project_id}/environments/{id}/experiments_config/ operations: - name: environmentsexperimentsconfigretrieve method: GET description: Manage experiment configuration for this environment. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: environmentsexperimentsconfigpartialupdate method: PATCH description: Manage experiment configuration for this environment. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-generate_conversations_public_token path: /api/projects/{project_id}/environments/{id}/generate_conversations_public_token/ operations: - name: environmentsgenerateconversationspublictokencreate method: POST description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-is_generating_demo_data path: /api/projects/{project_id}/environments/{id}/is_generating_demo_data/ operations: - name: environmentsisgeneratingdemodataretrieve method: GET description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: api-projects-project_id-environments-id-reset_token path: /api/projects/{project_id}/environments/{id}/reset_token/ operations: - name: environmentsresettokenpartialupdate method: PATCH description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-rotate_secret_token path: /api/projects/{project_id}/environments/{id}/rotate_secret_token/ operations: - name: environmentsrotatesecrettokenpartialupdate method: PATCH description: 'Deprecated: use /api/environments/{id}/ instead.' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-environments-id-settings_as_of path: /api/projects/{project_id}/environments/{id}/settings_as_of/ operations: - name: environmentssettingsasofretrieve method: GET description: Return the team settings as of the provided timestamp. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this environment (aka team). required: true authentication: type: bearer token: '{{env.POSTHOG_API_KEY}}' exposes: - type: rest namespace: posthog-environments-rest port: 8080 description: REST adapter for PostHog API — environments. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/projects/{project-id}/environments name: api-projects-project-id-environments description: REST surface for api-projects-project_id-environments. operations: - method: GET name: environmentslist description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentslist with: limit: rest.limit offset: rest.offset outputParameters: - type: object mapping: $. - method: POST name: environmentscreate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentscreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id} name: api-projects-project-id-environments-id description: REST surface for api-projects-project_id-environments-id. operations: - method: GET name: environmentsretrieve description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: environmentsupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: PATCH name: environmentspartialupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentspartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: environmentsdestroy description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/activity name: api-projects-project-id-environments-id-activity description: REST surface for api-projects-project_id-environments-id-activity. operations: - method: GET name: environmentsactivityretrieve description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsactivityretrieve with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/add-product-intent name: api-projects-project-id-environments-id-add-product-intent description: REST surface for api-projects-project_id-environments-id-add_product_intent. operations: - method: PATCH name: environmentsaddproductintentpartialupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsaddproductintentpartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/complete-product-onboarding name: api-projects-project-id-environments-id-complete-product-onboarding description: REST surface for api-projects-project_id-environments-id-complete_product_onboarding. operations: - method: PATCH name: environmentscompleteproductonboardingpartialupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentscompleteproductonboardingpartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/default-evaluation-contexts name: api-projects-project-id-environments-id-default-evaluation-contexts description: REST surface for api-projects-project_id-environments-id-default_evaluation_contexts. operations: - method: GET name: environmentsdefaultevaluationcontextsretrieve description: Manage default evaluation contexts for a team. call: posthog-environments.environmentsdefaultevaluationcontextsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: POST name: environmentsdefaultevaluationcontextscreate description: Manage default evaluation contexts for a team. call: posthog-environments.environmentsdefaultevaluationcontextscreate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: environmentsdefaultevaluationcontextsdestroy description: Manage default evaluation contexts for a team. call: posthog-environments.environmentsdefaultevaluationcontextsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/default-release-conditions name: api-projects-project-id-environments-id-default-release-conditions description: REST surface for api-projects-project_id-environments-id-default_release_conditions. operations: - method: GET name: environmentsdefaultreleaseconditionsretrieve description: Manage default release conditions for new feature flags in this team. call: posthog-environments.environmentsdefaultreleaseconditionsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: environmentsdefaultreleaseconditionsupdate description: Manage default release conditions for new feature flags in this team. call: posthog-environments.environmentsdefaultreleaseconditionsupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/delete-secret-token-backup name: api-projects-project-id-environments-id-delete-secret-token-backup description: REST surface for api-projects-project_id-environments-id-delete_secret_token_backup. operations: - method: PATCH name: environmentsdeletesecrettokenbackuppartialupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsdeletesecrettokenbackuppartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/event-ingestion-restrictions name: api-projects-project-id-environments-id-event-ingestion-restrictions description: REST surface for api-projects-project_id-environments-id-event_ingestion_restrictions. operations: - method: GET name: environmentseventingestionrestrictionsretrieve description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentseventingestionrestrictionsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/experiments-config name: api-projects-project-id-environments-id-experiments-config description: REST surface for api-projects-project_id-environments-id-experiments_config. operations: - method: GET name: environmentsexperimentsconfigretrieve description: Manage experiment configuration for this environment. call: posthog-environments.environmentsexperimentsconfigretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PATCH name: environmentsexperimentsconfigpartialupdate description: Manage experiment configuration for this environment. call: posthog-environments.environmentsexperimentsconfigpartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/generate-conversations-public-token name: api-projects-project-id-environments-id-generate-conversations-public-token description: REST surface for api-projects-project_id-environments-id-generate_conversations_public_token. operations: - method: POST name: environmentsgenerateconversationspublictokencreate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsgenerateconversationspublictokencreate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/is-generating-demo-data name: api-projects-project-id-environments-id-is-generating-demo-data description: REST surface for api-projects-project_id-environments-id-is_generating_demo_data. operations: - method: GET name: environmentsisgeneratingdemodataretrieve description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsisgeneratingdemodataretrieve with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/reset-token name: api-projects-project-id-environments-id-reset-token description: REST surface for api-projects-project_id-environments-id-reset_token. operations: - method: PATCH name: environmentsresettokenpartialupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsresettokenpartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/rotate-secret-token name: api-projects-project-id-environments-id-rotate-secret-token description: REST surface for api-projects-project_id-environments-id-rotate_secret_token. operations: - method: PATCH name: environmentsrotatesecrettokenpartialupdate description: 'Deprecated: use /api/environments/{id}/ instead.' call: posthog-environments.environmentsrotatesecrettokenpartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/environments/{id}/settings-as-of name: api-projects-project-id-environments-id-settings-as-of description: REST surface for api-projects-project_id-environments-id-settings_as_of. operations: - method: GET name: environmentssettingsasofretrieve description: Return the team settings as of the provided timestamp. call: posthog-environments.environmentssettingsasofretrieve with: id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: posthog-environments-mcp port: 9090 transport: http description: MCP adapter for PostHog API — environments. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: deprecated-use-api-environments-id description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentslist with: limit: tools.limit offset: tools.offset outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-2 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: false call: posthog-environments.environmentscreate with: body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-3 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-4 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-5 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentspartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-6 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: true idempotent: true call: posthog-environments.environmentsdestroy with: id: tools.id outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-7 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentsactivityretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-8 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsaddproductintentpartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-9 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentscompleteproductonboardingpartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: manage-default-evaluation-contexts-team description: Manage default evaluation contexts for a team. hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentsdefaultevaluationcontextsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: manage-default-evaluation-contexts-team-2 description: Manage default evaluation contexts for a team. hints: readOnly: false destructive: false idempotent: false call: posthog-environments.environmentsdefaultevaluationcontextscreate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: manage-default-evaluation-contexts-team-3 description: Manage default evaluation contexts for a team. hints: readOnly: false destructive: true idempotent: true call: posthog-environments.environmentsdefaultevaluationcontextsdestroy with: id: tools.id outputParameters: - type: object mapping: $. - name: manage-default-release-conditions-new description: Manage default release conditions for new feature flags in this team. hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentsdefaultreleaseconditionsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: manage-default-release-conditions-new-2 description: Manage default release conditions for new feature flags in this team. hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsdefaultreleaseconditionsupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-10 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsdeletesecrettokenbackuppartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-11 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentseventingestionrestrictionsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: manage-experiment-configuration-this-environment description: Manage experiment configuration for this environment. hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentsexperimentsconfigretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: manage-experiment-configuration-this-environment-2 description: Manage experiment configuration for this environment. hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsexperimentsconfigpartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-12 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: false call: posthog-environments.environmentsgenerateconversationspublictokencreate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-13 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentsisgeneratingdemodataretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-14 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsresettokenpartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: deprecated-use-api-environments-id-15 description: 'Deprecated: use /api/environments/{id}/ instead.' hints: readOnly: false destructive: false idempotent: true call: posthog-environments.environmentsrotatesecrettokenpartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: return-team-settings-provided-timestamp description: Return the team settings as of the provided timestamp. hints: readOnly: true destructive: false idempotent: true call: posthog-environments.environmentssettingsasofretrieve with: id: tools.id outputParameters: - type: object mapping: $.