naftiko: 1.0.0-alpha2 info: label: Courier — User Preferences description: 'Courier — User Preferences. 3 operations. Lead operation: Get user''s preferences. Self-contained Naftiko capability covering one Courier business surface.' tags: - Courier - User Preferences created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: COURIER_API_KEY: COURIER_API_KEY capability: consumes: - type: http namespace: courier-user-preferences baseUri: https://api.courier.com description: Courier — User Preferences business capability. Self-contained, no shared references. resources: - name: users-user_id-preferences path: /users/{user_id}/preferences operations: - name: userspreferenceslist method: GET description: Get user's preferences outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: A unique identifier associated with the user whose preferences you wish to retrieve. required: true - name: tenant_id in: query type: string description: Query the preferences of a user for this specific tenant context. - name: users-user_id-preferences-topic_id path: /users/{user_id}/preferences/{topic_id} operations: - name: userspreferencesget method: GET description: Get user subscription topic outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: A unique identifier associated with the user whose preferences you wish to retrieve. required: true - name: topic_id in: path type: string description: A unique identifier associated with a subscription topic. required: true - name: tenant_id in: query type: string description: Query the preferences of a user for this specific tenant context. - name: userspreferencesupdate method: PUT description: Update or Create user preferences for a specific subscription topic outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: A unique identifier associated with the user whose preferences you wish to retrieve. required: true - name: topic_id in: path type: string description: A unique identifier associated with a subscription topic. required: true - name: tenant_id in: query type: string description: Update the preferences of a user for this specific tenant context. - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.COURIER_API_KEY}}' exposes: - type: rest namespace: courier-user-preferences-rest port: 8080 description: REST adapter for Courier — User Preferences. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/users/{user-id}/preferences name: users-user-id-preferences description: REST surface for users-user_id-preferences. operations: - method: GET name: userspreferenceslist description: Get user's preferences call: courier-user-preferences.userspreferenceslist with: user_id: rest.user_id tenant_id: rest.tenant_id outputParameters: - type: object mapping: $. - path: /v1/users/{user-id}/preferences/{topic-id} name: users-user-id-preferences-topic-id description: REST surface for users-user_id-preferences-topic_id. operations: - method: GET name: userspreferencesget description: Get user subscription topic call: courier-user-preferences.userspreferencesget with: user_id: rest.user_id topic_id: rest.topic_id tenant_id: rest.tenant_id outputParameters: - type: object mapping: $. - method: PUT name: userspreferencesupdate description: Update or Create user preferences for a specific subscription topic call: courier-user-preferences.userspreferencesupdate with: user_id: rest.user_id topic_id: rest.topic_id tenant_id: rest.tenant_id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: courier-user-preferences-mcp port: 9090 transport: http description: MCP adapter for Courier — User Preferences. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-user-s-preferences description: Get user's preferences hints: readOnly: true destructive: false idempotent: true call: courier-user-preferences.userspreferenceslist with: user_id: tools.user_id tenant_id: tools.tenant_id outputParameters: - type: object mapping: $. - name: get-user-subscription-topic description: Get user subscription topic hints: readOnly: true destructive: false idempotent: true call: courier-user-preferences.userspreferencesget with: user_id: tools.user_id topic_id: tools.topic_id tenant_id: tools.tenant_id outputParameters: - type: object mapping: $. - name: update-create-user-preferences-specific description: Update or Create user preferences for a specific subscription topic hints: readOnly: false destructive: false idempotent: true call: courier-user-preferences.userspreferencesupdate with: user_id: tools.user_id topic_id: tools.topic_id tenant_id: tools.tenant_id body: tools.body outputParameters: - type: object mapping: $.