naftiko: 1.0.0-alpha2 info: label: PostHog API — organizations description: 'PostHog API — organizations. 10 operations. Lead operation: organizations. Self-contained Naftiko capability covering one Posthog business surface.' tags: - Posthog - organizations created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: POSTHOG_API_KEY: POSTHOG_API_KEY capability: consumes: - type: http namespace: posthog-organizations baseUri: '' description: PostHog API — organizations business capability. Self-contained, no shared references. resources: - name: api-organizations path: /api/organizations/ operations: - name: list method: GET description: '' 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: create method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-organizations-id path: /api/organizations/{id}/ operations: - name: retrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization. required: true - name: update method: PUT description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: partialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: destroy method: DELETE description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization. required: true - name: api-organizations-organization_id-integrations path: /api/organizations/{organization_id}/integrations/ operations: - name: orgorganizationsintegrationslist method: GET description: ViewSet for organization-level integrations. 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: api-organizations-organization_id-integrations-id path: /api/organizations/{organization_id}/integrations/{id}/ operations: - name: orgorganizationsintegrationsretrieve method: GET description: ViewSet for organization-level integrations. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization integration. required: true - name: orgorganizationintegrationsdestroy method: DELETE description: ViewSet for organization-level integrations. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization integration. required: true - name: api-organizations-organization_id-integrations-id-environment-mapping path: /api/organizations/{organization_id}/integrations/{id}/environment-mapping/ operations: - name: integrationsenvironmentmappingpartialupdate method: PATCH description: ViewSet for organization-level integrations. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this organization integration. required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.POSTHOG_API_KEY}}' exposes: - type: rest namespace: posthog-organizations-rest port: 8080 description: REST adapter for PostHog API — organizations. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/organizations name: api-organizations description: REST surface for api-organizations. operations: - method: GET name: list description: list call: posthog-organizations.list with: limit: rest.limit offset: rest.offset outputParameters: - type: object mapping: $. - method: POST name: create description: create call: posthog-organizations.create with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/organizations/{id} name: api-organizations-id description: REST surface for api-organizations-id. operations: - method: GET name: retrieve description: retrieve call: posthog-organizations.retrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: update description: update call: posthog-organizations.update with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: PATCH name: partialupdate description: partialupdate call: posthog-organizations.partialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: destroy description: destroy call: posthog-organizations.destroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/organizations/{organization-id}/integrations name: api-organizations-organization-id-integrations description: REST surface for api-organizations-organization_id-integrations. operations: - method: GET name: orgorganizationsintegrationslist description: ViewSet for organization-level integrations. call: posthog-organizations.orgorganizationsintegrationslist with: limit: rest.limit offset: rest.offset outputParameters: - type: object mapping: $. - path: /v1/api/organizations/{organization-id}/integrations/{id} name: api-organizations-organization-id-integrations-id description: REST surface for api-organizations-organization_id-integrations-id. operations: - method: GET name: orgorganizationsintegrationsretrieve description: ViewSet for organization-level integrations. call: posthog-organizations.orgorganizationsintegrationsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: DELETE name: orgorganizationintegrationsdestroy description: ViewSet for organization-level integrations. call: posthog-organizations.orgorganizationintegrationsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/organizations/{organization-id}/integrations/{id}/environment-mapping name: api-organizations-organization-id-integrations-id-environment-mapping description: REST surface for api-organizations-organization_id-integrations-id-environment-mapping. operations: - method: PATCH name: integrationsenvironmentmappingpartialupdate description: ViewSet for organization-level integrations. call: posthog-organizations.integrationsenvironmentmappingpartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: posthog-organizations-mcp port: 9090 transport: http description: MCP adapter for PostHog API — organizations. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list description: list hints: readOnly: true destructive: false idempotent: true call: posthog-organizations.list with: limit: tools.limit offset: tools.offset outputParameters: - type: object mapping: $. - name: create description: create hints: readOnly: false destructive: false idempotent: false call: posthog-organizations.create with: body: tools.body outputParameters: - type: object mapping: $. - name: retrieve description: retrieve hints: readOnly: true destructive: false idempotent: true call: posthog-organizations.retrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: update description: update hints: readOnly: false destructive: false idempotent: true call: posthog-organizations.update with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: partialupdate description: partialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-organizations.partialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: destroy description: destroy hints: readOnly: false destructive: true idempotent: true call: posthog-organizations.destroy with: id: tools.id outputParameters: - type: object mapping: $. - name: viewset-organization-level-integrations description: ViewSet for organization-level integrations. hints: readOnly: true destructive: false idempotent: true call: posthog-organizations.orgorganizationsintegrationslist with: limit: tools.limit offset: tools.offset outputParameters: - type: object mapping: $. - name: viewset-organization-level-integrations-2 description: ViewSet for organization-level integrations. hints: readOnly: true destructive: false idempotent: true call: posthog-organizations.orgorganizationsintegrationsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: viewset-organization-level-integrations-3 description: ViewSet for organization-level integrations. hints: readOnly: false destructive: true idempotent: true call: posthog-organizations.orgorganizationintegrationsdestroy with: id: tools.id outputParameters: - type: object mapping: $. - name: viewset-organization-level-integrations-4 description: ViewSet for organization-level integrations. hints: readOnly: false destructive: false idempotent: true call: posthog-organizations.integrationsenvironmentmappingpartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $.