naftiko: 1.0.0-alpha2 info: label: Knock API — Subscriptions description: 'Knock API — Subscriptions. 6 operations. Lead operation: Bulk add subscriptions. Self-contained Naftiko capability covering one Knock business surface.' tags: - Knock - Subscriptions created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: KNOCK_API_KEY: KNOCK_API_KEY capability: consumes: - type: http namespace: knock-subscriptions baseUri: https://api.knock.app description: Knock API — Subscriptions business capability. Self-contained, no shared references. resources: - name: v1-objects-collection-bulk-subscriptions-add path: /v1/objects/{collection}/bulk/subscriptions/add operations: - name: bulkaddsubscriptions method: POST description: Bulk add subscriptions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: collection in: path type: string description: The collection this object belongs to. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v1-objects-collection-bulk-subscriptions-delete path: /v1/objects/{collection}/bulk/subscriptions/delete operations: - name: bulkdeletesubscriptions method: POST description: Bulk delete subscriptions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: collection in: path type: string description: The collection this object belongs to. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v1-objects-collection-object_id-subscriptions path: /v1/objects/{collection}/{object_id}/subscriptions operations: - name: deletesubscriptionsforobject method: DELETE description: Delete subscriptions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: object_id in: path type: string description: Unique identifier for the object. required: true - name: collection in: path type: string description: The collection this object belongs to. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: listsubscriptionsforobject method: GET description: List subscriptions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: mode in: query type: string description: Mode of the request. `recipient` to list the objects that the provided object is subscribed to, `object` to list the recipients that subscribe to the provided o - name: include[] in: query type: array description: Additional fields to include in the response. - name: recipients[] in: query type: array description: Recipients to filter by (only used if mode is `object`). - name: objects[] in: query type: array description: Objects to filter by (only used if mode is `recipient`). - name: object_id in: path type: string description: Unique identifier for the object. required: true - name: collection in: path type: string description: The collection this object belongs to. required: true - name: after in: query type: string description: The cursor to fetch entries after. - name: before in: query type: string description: The cursor to fetch entries before. - name: page_size in: query type: integer description: The number of items per page (defaults to 50). - name: addsubscriptionsforobject method: POST description: Add subscriptions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: object_id in: path type: string description: Unique identifier for the object. required: true - name: collection in: path type: string description: The collection this object belongs to. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v1-users-user_id-subscriptions path: /v1/users/{user_id}/subscriptions operations: - name: listsubscriptionsforuser method: GET description: List user subscriptions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: The user ID to list subscriptions for. required: true - name: include[] in: query type: array description: Associated resources to include in the response. - name: objects[] in: query type: array description: Only returns subscriptions for the specified object references. - name: after in: query type: string description: The cursor to fetch entries after. - name: before in: query type: string description: The cursor to fetch entries before. - name: page_size in: query type: integer description: The number of items per page (defaults to 50). authentication: type: bearer token: '{{env.KNOCK_API_KEY}}' exposes: - type: rest namespace: knock-subscriptions-rest port: 8080 description: REST adapter for Knock API — Subscriptions. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/objects/{collection}/bulk/subscriptions/add name: v1-objects-collection-bulk-subscriptions-add description: REST surface for v1-objects-collection-bulk-subscriptions-add. operations: - method: POST name: bulkaddsubscriptions description: Bulk add subscriptions call: knock-subscriptions.bulkaddsubscriptions with: collection: rest.collection body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/objects/{collection}/bulk/subscriptions/delete name: v1-objects-collection-bulk-subscriptions-delete description: REST surface for v1-objects-collection-bulk-subscriptions-delete. operations: - method: POST name: bulkdeletesubscriptions description: Bulk delete subscriptions call: knock-subscriptions.bulkdeletesubscriptions with: collection: rest.collection body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/objects/{collection}/{object-id}/subscriptions name: v1-objects-collection-object-id-subscriptions description: REST surface for v1-objects-collection-object_id-subscriptions. operations: - method: DELETE name: deletesubscriptionsforobject description: Delete subscriptions call: knock-subscriptions.deletesubscriptionsforobject with: object_id: rest.object_id collection: rest.collection body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listsubscriptionsforobject description: List subscriptions call: knock-subscriptions.listsubscriptionsforobject with: mode: rest.mode include[]: rest.include[] recipients[]: rest.recipients[] objects[]: rest.objects[] object_id: rest.object_id collection: rest.collection after: rest.after before: rest.before page_size: rest.page_size outputParameters: - type: object mapping: $. - method: POST name: addsubscriptionsforobject description: Add subscriptions call: knock-subscriptions.addsubscriptionsforobject with: object_id: rest.object_id collection: rest.collection body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/users/{user-id}/subscriptions name: v1-users-user-id-subscriptions description: REST surface for v1-users-user_id-subscriptions. operations: - method: GET name: listsubscriptionsforuser description: List user subscriptions call: knock-subscriptions.listsubscriptionsforuser with: user_id: rest.user_id include[]: rest.include[] objects[]: rest.objects[] after: rest.after before: rest.before page_size: rest.page_size outputParameters: - type: object mapping: $. - type: mcp namespace: knock-subscriptions-mcp port: 9090 transport: http description: MCP adapter for Knock API — Subscriptions. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: bulk-add-subscriptions description: Bulk add subscriptions hints: readOnly: false destructive: false idempotent: false call: knock-subscriptions.bulkaddsubscriptions with: collection: tools.collection body: tools.body outputParameters: - type: object mapping: $. - name: bulk-delete-subscriptions description: Bulk delete subscriptions hints: readOnly: false destructive: false idempotent: false call: knock-subscriptions.bulkdeletesubscriptions with: collection: tools.collection body: tools.body outputParameters: - type: object mapping: $. - name: delete-subscriptions description: Delete subscriptions hints: readOnly: false destructive: true idempotent: true call: knock-subscriptions.deletesubscriptionsforobject with: object_id: tools.object_id collection: tools.collection body: tools.body outputParameters: - type: object mapping: $. - name: list-subscriptions description: List subscriptions hints: readOnly: true destructive: false idempotent: true call: knock-subscriptions.listsubscriptionsforobject with: mode: tools.mode include[]: tools.include[] recipients[]: tools.recipients[] objects[]: tools.objects[] object_id: tools.object_id collection: tools.collection after: tools.after before: tools.before page_size: tools.page_size outputParameters: - type: object mapping: $. - name: add-subscriptions description: Add subscriptions hints: readOnly: false destructive: false idempotent: false call: knock-subscriptions.addsubscriptionsforobject with: object_id: tools.object_id collection: tools.collection body: tools.body outputParameters: - type: object mapping: $. - name: list-user-subscriptions description: List user subscriptions hints: readOnly: true destructive: false idempotent: true call: knock-subscriptions.listsubscriptionsforuser with: user_id: tools.user_id include[]: tools.include[] objects[]: tools.objects[] after: tools.after before: tools.before page_size: tools.page_size outputParameters: - type: object mapping: $.