naftiko: 1.0.0-alpha2 info: label: Courier — User Tenants description: 'Courier — User Tenants. 5 operations. Lead operation: Get tenants associated with a given user. Self-contained Naftiko capability covering one Courier business surface.' tags: - Courier - User Tenants 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-tenants baseUri: https://api.courier.com description: Courier — User Tenants business capability. Self-contained, no shared references. resources: - name: users-user_id-tenants path: /users/{user_id}/tenants operations: - name: userstenantslist method: GET description: Get tenants associated with a given user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: Id of the user to retrieve all associated tenants for. required: true - name: limit in: query type: integer description: 'The number of accounts to return ' - name: cursor in: query type: string description: Continue the pagination with the next cursor - name: userstenantsaddmultiple method: PUT description: Add a User to Multiple Tenants outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: The user's ID. This can be any uniquely identifiable string. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: userstenantsremoveall method: DELETE description: Remove User From All Associated Tenants outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: Id of the user to be removed from the supplied tenant. required: true - name: users-user_id-tenants-tenant_id path: /users/{user_id}/tenants/{tenant_id} operations: - name: userstenantsadd method: PUT description: Add a User to a Single Tenant outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: Id of the user to be added to the supplied tenant. required: true - name: tenant_id in: path type: string description: Id of the tenant the user should be added to. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: userstenantsremove method: DELETE description: Remove User from a Tenant outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: user_id in: path type: string description: Id of the user to be removed from the supplied tenant. required: true - name: tenant_id in: path type: string description: Id of the tenant the user should be removed from. required: true authentication: type: bearer token: '{{env.COURIER_API_KEY}}' exposes: - type: rest namespace: courier-user-tenants-rest port: 8080 description: REST adapter for Courier — User Tenants. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/users/{user-id}/tenants name: users-user-id-tenants description: REST surface for users-user_id-tenants. operations: - method: GET name: userstenantslist description: Get tenants associated with a given user call: courier-user-tenants.userstenantslist with: user_id: rest.user_id limit: rest.limit cursor: rest.cursor outputParameters: - type: object mapping: $. - method: PUT name: userstenantsaddmultiple description: Add a User to Multiple Tenants call: courier-user-tenants.userstenantsaddmultiple with: user_id: rest.user_id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: userstenantsremoveall description: Remove User From All Associated Tenants call: courier-user-tenants.userstenantsremoveall with: user_id: rest.user_id outputParameters: - type: object mapping: $. - path: /v1/users/{user-id}/tenants/{tenant-id} name: users-user-id-tenants-tenant-id description: REST surface for users-user_id-tenants-tenant_id. operations: - method: PUT name: userstenantsadd description: Add a User to a Single Tenant call: courier-user-tenants.userstenantsadd with: user_id: rest.user_id tenant_id: rest.tenant_id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: userstenantsremove description: Remove User from a Tenant call: courier-user-tenants.userstenantsremove with: user_id: rest.user_id tenant_id: rest.tenant_id outputParameters: - type: object mapping: $. - type: mcp namespace: courier-user-tenants-mcp port: 9090 transport: http description: MCP adapter for Courier — User Tenants. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-tenants-associated-given-user description: Get tenants associated with a given user hints: readOnly: true destructive: false idempotent: true call: courier-user-tenants.userstenantslist with: user_id: tools.user_id limit: tools.limit cursor: tools.cursor outputParameters: - type: object mapping: $. - name: add-user-multiple-tenants description: Add a User to Multiple Tenants hints: readOnly: false destructive: false idempotent: true call: courier-user-tenants.userstenantsaddmultiple with: user_id: tools.user_id body: tools.body outputParameters: - type: object mapping: $. - name: remove-user-all-associated-tenants description: Remove User From All Associated Tenants hints: readOnly: false destructive: true idempotent: true call: courier-user-tenants.userstenantsremoveall with: user_id: tools.user_id outputParameters: - type: object mapping: $. - name: add-user-single-tenant description: Add a User to a Single Tenant hints: readOnly: false destructive: false idempotent: true call: courier-user-tenants.userstenantsadd with: user_id: tools.user_id tenant_id: tools.tenant_id body: tools.body outputParameters: - type: object mapping: $. - name: remove-user-tenant description: Remove User from a Tenant hints: readOnly: false destructive: true idempotent: true call: courier-user-tenants.userstenantsremove with: user_id: tools.user_id tenant_id: tools.tenant_id outputParameters: - type: object mapping: $.