naftiko: 1.0.0-alpha2 info: label: PostHog API — subscriptions description: 'PostHog API — subscriptions. 16 operations. Lead operation: List subscription deliveries. Self-contained Naftiko capability covering one Posthog business surface.' tags: - Posthog - subscriptions created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: POSTHOG_API_KEY: POSTHOG_API_KEY capability: consumes: - type: http namespace: posthog-subscriptions baseUri: '' description: PostHog API — subscriptions business capability. Self-contained, no shared references. resources: - name: api-environments-environment_id-subscriptions path: /api/environments/{environment_id}/subscriptions/ operations: - name: environmentssubscriptionslist method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: created_by in: query type: string description: Filter by creator user UUID. - name: dashboard in: query type: integer description: Filter by dashboard ID. - name: insight in: query type: integer description: Filter by insight ID. - 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: ordering in: query type: string description: Which field to use when ordering the results. - name: resource_type in: query type: string description: 'Filter by subscription resource: insight vs dashboard export.' - name: search in: query type: string description: A search term. - name: target_type in: query type: string description: Filter by delivery channel (email, Slack, or webhook). - name: environmentssubscriptionscreate 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-environments-environment_id-subscriptions-id path: /api/environments/{environment_id}/subscriptions/{id}/ operations: - name: environmentssubscriptionsretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: environmentssubscriptionsupdate method: PUT description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: environmentssubscriptionspartialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: environmentssubscriptionsdestroy method: DELETE description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: api-environments-environment_id-subscriptions-id-test-delivery path: /api/environments/{environment_id}/subscriptions/{id}/test-delivery/ operations: - name: environmentssubscriptionstestdeliverycreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: api-environments-project_id-subscriptions-subscription_id-deliveries path: /api/environments/{project_id}/subscriptions/{subscription_id}/deliveries/ operations: - name: subscriptionsdeliverieslist method: GET description: List subscription deliveries outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: cursor in: query type: string description: The pagination cursor value. - name: status in: query type: string description: Return only deliveries in this run status (starting, completed, failed, or skipped). - name: subscription_id in: path type: integer required: true - name: api-environments-project_id-subscriptions-subscription_id-deliveries-id path: /api/environments/{project_id}/subscriptions/{subscription_id}/deliveries/{id}/ operations: - name: subscriptionsdeliveriesretrieve method: GET description: Retrieve subscription delivery outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A UUID string identifying this subscription delivery. required: true - name: subscription_id in: path type: integer required: true - name: api-projects-project_id-subscriptions path: /api/projects/{project_id}/subscriptions/ operations: - name: subscriptionslist method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: created_by in: query type: string description: Filter by creator user UUID. - name: dashboard in: query type: integer description: Filter by dashboard ID. - name: insight in: query type: integer description: Filter by insight ID. - 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: ordering in: query type: string description: Which field to use when ordering the results. - name: resource_type in: query type: string description: 'Filter by subscription resource: insight vs dashboard export.' - name: search in: query type: string description: A search term. - name: target_type in: query type: string description: Filter by delivery channel (email, Slack, or webhook). - name: subscriptionscreate 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-projects-project_id-subscriptions-id path: /api/projects/{project_id}/subscriptions/{id}/ operations: - name: subscriptionsretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: subscriptionsupdate method: PUT description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: subscriptionspartialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: subscriptionsdestroy method: DELETE description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true - name: api-projects-project_id-subscriptions-id-test-delivery path: /api/projects/{project_id}/subscriptions/{id}/test-delivery/ operations: - name: subscriptionstestdeliverycreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this subscription. required: true authentication: type: bearer token: '{{env.POSTHOG_API_KEY}}' exposes: - type: rest namespace: posthog-subscriptions-rest port: 8080 description: REST adapter for PostHog API — subscriptions. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/environments/{environment-id}/subscriptions name: api-environments-environment-id-subscriptions description: REST surface for api-environments-environment_id-subscriptions. operations: - method: GET name: environmentssubscriptionslist description: environmentssubscriptionslist call: posthog-subscriptions.environmentssubscriptionslist with: created_by: rest.created_by dashboard: rest.dashboard insight: rest.insight limit: rest.limit offset: rest.offset ordering: rest.ordering resource_type: rest.resource_type search: rest.search target_type: rest.target_type outputParameters: - type: object mapping: $. - method: POST name: environmentssubscriptionscreate description: environmentssubscriptionscreate call: posthog-subscriptions.environmentssubscriptionscreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{environment-id}/subscriptions/{id} name: api-environments-environment-id-subscriptions-id description: REST surface for api-environments-environment_id-subscriptions-id. operations: - method: GET name: environmentssubscriptionsretrieve description: environmentssubscriptionsretrieve call: posthog-subscriptions.environmentssubscriptionsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: environmentssubscriptionsupdate description: environmentssubscriptionsupdate call: posthog-subscriptions.environmentssubscriptionsupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: PATCH name: environmentssubscriptionspartialupdate description: environmentssubscriptionspartialupdate call: posthog-subscriptions.environmentssubscriptionspartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: environmentssubscriptionsdestroy description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true call: posthog-subscriptions.environmentssubscriptionsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/environments/{environment-id}/subscriptions/{id}/test-delivery name: api-environments-environment-id-subscriptions-id-test-delivery description: REST surface for api-environments-environment_id-subscriptions-id-test-delivery. operations: - method: POST name: environmentssubscriptionstestdeliverycreate description: environmentssubscriptionstestdeliverycreate call: posthog-subscriptions.environmentssubscriptionstestdeliverycreate with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/subscriptions/{subscription-id}/deliveries name: api-environments-project-id-subscriptions-subscription-id-deliveries description: REST surface for api-environments-project_id-subscriptions-subscription_id-deliveries. operations: - method: GET name: subscriptionsdeliverieslist description: List subscription deliveries call: posthog-subscriptions.subscriptionsdeliverieslist with: cursor: rest.cursor status: rest.status subscription_id: rest.subscription_id outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/subscriptions/{subscription-id}/deliveries/{id} name: api-environments-project-id-subscriptions-subscription-id-deliveries-id description: REST surface for api-environments-project_id-subscriptions-subscription_id-deliveries-id. operations: - method: GET name: subscriptionsdeliveriesretrieve description: Retrieve subscription delivery call: posthog-subscriptions.subscriptionsdeliveriesretrieve with: id: rest.id subscription_id: rest.subscription_id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/subscriptions name: api-projects-project-id-subscriptions description: REST surface for api-projects-project_id-subscriptions. operations: - method: GET name: subscriptionslist description: subscriptionslist call: posthog-subscriptions.subscriptionslist with: created_by: rest.created_by dashboard: rest.dashboard insight: rest.insight limit: rest.limit offset: rest.offset ordering: rest.ordering resource_type: rest.resource_type search: rest.search target_type: rest.target_type outputParameters: - type: object mapping: $. - method: POST name: subscriptionscreate description: subscriptionscreate call: posthog-subscriptions.subscriptionscreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/subscriptions/{id} name: api-projects-project-id-subscriptions-id description: REST surface for api-projects-project_id-subscriptions-id. operations: - method: GET name: subscriptionsretrieve description: subscriptionsretrieve call: posthog-subscriptions.subscriptionsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: subscriptionsupdate description: subscriptionsupdate call: posthog-subscriptions.subscriptionsupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: PATCH name: subscriptionspartialupdate description: subscriptionspartialupdate call: posthog-subscriptions.subscriptionspartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: subscriptionsdestroy description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true call: posthog-subscriptions.subscriptionsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/subscriptions/{id}/test-delivery name: api-projects-project-id-subscriptions-id-test-delivery description: REST surface for api-projects-project_id-subscriptions-id-test-delivery. operations: - method: POST name: subscriptionstestdeliverycreate description: subscriptionstestdeliverycreate call: posthog-subscriptions.subscriptionstestdeliverycreate with: id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: posthog-subscriptions-mcp port: 9090 transport: http description: MCP adapter for PostHog API — subscriptions. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: environmentssubscriptionslist description: environmentssubscriptionslist hints: readOnly: true destructive: false idempotent: true call: posthog-subscriptions.environmentssubscriptionslist with: created_by: tools.created_by dashboard: tools.dashboard insight: tools.insight limit: tools.limit offset: tools.offset ordering: tools.ordering resource_type: tools.resource_type search: tools.search target_type: tools.target_type outputParameters: - type: object mapping: $. - name: environmentssubscriptionscreate description: environmentssubscriptionscreate hints: readOnly: false destructive: false idempotent: false call: posthog-subscriptions.environmentssubscriptionscreate with: body: tools.body outputParameters: - type: object mapping: $. - name: environmentssubscriptionsretrieve description: environmentssubscriptionsretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-subscriptions.environmentssubscriptionsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: environmentssubscriptionsupdate description: environmentssubscriptionsupdate hints: readOnly: false destructive: false idempotent: true call: posthog-subscriptions.environmentssubscriptionsupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: environmentssubscriptionspartialupdate description: environmentssubscriptionspartialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-subscriptions.environmentssubscriptionspartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: hard-delete-this-model-is description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true hints: readOnly: false destructive: true idempotent: true call: posthog-subscriptions.environmentssubscriptionsdestroy with: id: tools.id outputParameters: - type: object mapping: $. - name: environmentssubscriptionstestdeliverycreate description: environmentssubscriptionstestdeliverycreate hints: readOnly: false destructive: false idempotent: false call: posthog-subscriptions.environmentssubscriptionstestdeliverycreate with: id: tools.id outputParameters: - type: object mapping: $. - name: list-subscription-deliveries description: List subscription deliveries hints: readOnly: true destructive: false idempotent: true call: posthog-subscriptions.subscriptionsdeliverieslist with: cursor: tools.cursor status: tools.status subscription_id: tools.subscription_id outputParameters: - type: object mapping: $. - name: retrieve-subscription-delivery description: Retrieve subscription delivery hints: readOnly: true destructive: false idempotent: true call: posthog-subscriptions.subscriptionsdeliveriesretrieve with: id: tools.id subscription_id: tools.subscription_id outputParameters: - type: object mapping: $. - name: subscriptionslist description: subscriptionslist hints: readOnly: true destructive: false idempotent: true call: posthog-subscriptions.subscriptionslist with: created_by: tools.created_by dashboard: tools.dashboard insight: tools.insight limit: tools.limit offset: tools.offset ordering: tools.ordering resource_type: tools.resource_type search: tools.search target_type: tools.target_type outputParameters: - type: object mapping: $. - name: subscriptionscreate description: subscriptionscreate hints: readOnly: false destructive: false idempotent: false call: posthog-subscriptions.subscriptionscreate with: body: tools.body outputParameters: - type: object mapping: $. - name: subscriptionsretrieve description: subscriptionsretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-subscriptions.subscriptionsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: subscriptionsupdate description: subscriptionsupdate hints: readOnly: false destructive: false idempotent: true call: posthog-subscriptions.subscriptionsupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: subscriptionspartialupdate description: subscriptionspartialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-subscriptions.subscriptionspartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: hard-delete-this-model-is-2 description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true hints: readOnly: false destructive: true idempotent: true call: posthog-subscriptions.subscriptionsdestroy with: id: tools.id outputParameters: - type: object mapping: $. - name: subscriptionstestdeliverycreate description: subscriptionstestdeliverycreate hints: readOnly: false destructive: false idempotent: false call: posthog-subscriptions.subscriptionstestdeliverycreate with: id: tools.id outputParameters: - type: object mapping: $.