Courier · Capability

Courier — Tenants

Courier — Tenants. 7 operations. Lead operation: Get a List of Tenants. Self-contained Naftiko capability covering one Courier business surface.

Run with Naftiko CourierTenants

What You Can Do

GET
Tenantslist — Get a List of Tenants
/v1/tenants
GET
Tenantsget — Get a Tenant
/v1/tenants/{tenant-id}
PUT
Tenantscreateorreplace — Create or Replace a Tenant
/v1/tenants/{tenant-id}
DELETE
Tenantsdelete — Delete a Tenant
/v1/tenants/{tenant-id}
PUT
Tenantscreateorreplacedefaultpreferencesfortopic — Create or Replace Default Preferences For Topic
/v1/tenants/{tenant-id}/default-preferences/items/{topic-id}
DELETE
Tenantsremovedefaultpreferencesfortopic — Remove Default Preferences For Topic
/v1/tenants/{tenant-id}/default-preferences/items/{topic-id}
GET
Tenantsgetusersbytenant — Get Users in Tenant
/v1/tenants/{tenant-id}/users

MCP Tools

get-list-tenants

Get a List of Tenants

read-only idempotent
get-tenant

Get a Tenant

read-only idempotent
create-replace-tenant

Create or Replace a Tenant

idempotent
delete-tenant

Delete a Tenant

idempotent
create-replace-default-preferences-topic

Create or Replace Default Preferences For Topic

idempotent
remove-default-preferences-topic

Remove Default Preferences For Topic

idempotent
get-users-tenant

Get Users in Tenant

read-only idempotent

Capability Spec

courier-tenants.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Courier — Tenants
  description: 'Courier — Tenants. 7 operations. Lead operation: Get a List of Tenants. Self-contained Naftiko capability
    covering one Courier business surface.'
  tags:
  - Courier
  - 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-tenants
    baseUri: https://api.courier.com
    description: Courier — Tenants business capability. Self-contained, no shared references.
    resources:
    - name: tenants
      path: /tenants
      operations:
      - name: tenantslist
        method: GET
        description: Get a List of Tenants
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: parent_tenant_id
          in: query
          type: string
          description: Filter the list of tenants by parent_id
        - name: limit
          in: query
          type: integer
          description: 'The number of tenants to return '
        - name: cursor
          in: query
          type: string
          description: Continue the pagination with the next cursor
    - name: tenants-tenant_id
      path: /tenants/{tenant_id}
      operations:
      - name: tenantsget
        method: GET
        description: Get a Tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: path
          type: string
          description: A unique identifier representing the tenant to be returned.
          required: true
      - name: tenantscreateorreplace
        method: PUT
        description: Create or Replace a Tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: path
          type: string
          description: A unique identifier representing the tenant to be returned.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: tenantsdelete
        method: DELETE
        description: Delete a Tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: path
          type: string
          description: Id of the tenant to be deleted.
          required: true
    - name: tenants-tenant_id-default_preferences-items-topic_id
      path: /tenants/{tenant_id}/default_preferences/items/{topic_id}
      operations:
      - name: tenantscreateorreplacedefaultpreferencesfortopic
        method: PUT
        description: Create or Replace Default Preferences For Topic
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: path
          type: string
          description: Id of the tenant to update the default preferences for.
          required: true
        - name: topic_id
          in: path
          type: string
          description: Id of the subscription topic you want to have a default preference for.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: tenantsremovedefaultpreferencesfortopic
        method: DELETE
        description: Remove Default Preferences For Topic
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: path
          type: string
          description: Id of the tenant to update the default preferences for.
          required: true
        - name: topic_id
          in: path
          type: string
          description: Id of the subscription topic you want to have a default preference for.
          required: true
    - name: tenants-tenant_id-users
      path: /tenants/{tenant_id}/users
      operations:
      - name: tenantsgetusersbytenant
        method: GET
        description: Get Users in Tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: path
          type: string
          description: Id of the tenant for user membership.
          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
    authentication:
      type: bearer
      token: '{{env.COURIER_API_KEY}}'
  exposes:
  - type: rest
    namespace: courier-tenants-rest
    port: 8080
    description: REST adapter for Courier — Tenants. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/tenants
      name: tenants
      description: REST surface for tenants.
      operations:
      - method: GET
        name: tenantslist
        description: Get a List of Tenants
        call: courier-tenants.tenantslist
        with:
          parent_tenant_id: rest.parent_tenant_id
          limit: rest.limit
          cursor: rest.cursor
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tenants/{tenant-id}
      name: tenants-tenant-id
      description: REST surface for tenants-tenant_id.
      operations:
      - method: GET
        name: tenantsget
        description: Get a Tenant
        call: courier-tenants.tenantsget
        with:
          tenant_id: rest.tenant_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: tenantscreateorreplace
        description: Create or Replace a Tenant
        call: courier-tenants.tenantscreateorreplace
        with:
          tenant_id: rest.tenant_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: tenantsdelete
        description: Delete a Tenant
        call: courier-tenants.tenantsdelete
        with:
          tenant_id: rest.tenant_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tenants/{tenant-id}/default-preferences/items/{topic-id}
      name: tenants-tenant-id-default-preferences-items-topic-id
      description: REST surface for tenants-tenant_id-default_preferences-items-topic_id.
      operations:
      - method: PUT
        name: tenantscreateorreplacedefaultpreferencesfortopic
        description: Create or Replace Default Preferences For Topic
        call: courier-tenants.tenantscreateorreplacedefaultpreferencesfortopic
        with:
          tenant_id: rest.tenant_id
          topic_id: rest.topic_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: tenantsremovedefaultpreferencesfortopic
        description: Remove Default Preferences For Topic
        call: courier-tenants.tenantsremovedefaultpreferencesfortopic
        with:
          tenant_id: rest.tenant_id
          topic_id: rest.topic_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tenants/{tenant-id}/users
      name: tenants-tenant-id-users
      description: REST surface for tenants-tenant_id-users.
      operations:
      - method: GET
        name: tenantsgetusersbytenant
        description: Get Users in Tenant
        call: courier-tenants.tenantsgetusersbytenant
        with:
          tenant_id: rest.tenant_id
          limit: rest.limit
          cursor: rest.cursor
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: courier-tenants-mcp
    port: 9090
    transport: http
    description: MCP adapter for Courier — Tenants. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-list-tenants
      description: Get a List of Tenants
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: courier-tenants.tenantslist
      with:
        parent_tenant_id: tools.parent_tenant_id
        limit: tools.limit
        cursor: tools.cursor
      outputParameters:
      - type: object
        mapping: $.
    - name: get-tenant
      description: Get a Tenant
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: courier-tenants.tenantsget
      with:
        tenant_id: tools.tenant_id
      outputParameters:
      - type: object
        mapping: $.
    - name: create-replace-tenant
      description: Create or Replace a Tenant
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: courier-tenants.tenantscreateorreplace
      with:
        tenant_id: tools.tenant_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-tenant
      description: Delete a Tenant
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: courier-tenants.tenantsdelete
      with:
        tenant_id: tools.tenant_id
      outputParameters:
      - type: object
        mapping: $.
    - name: create-replace-default-preferences-topic
      description: Create or Replace Default Preferences For Topic
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: courier-tenants.tenantscreateorreplacedefaultpreferencesfortopic
      with:
        tenant_id: tools.tenant_id
        topic_id: tools.topic_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-default-preferences-topic
      description: Remove Default Preferences For Topic
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: courier-tenants.tenantsremovedefaultpreferencesfortopic
      with:
        tenant_id: tools.tenant_id
        topic_id: tools.topic_id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-users-tenant
      description: Get Users in Tenant
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: courier-tenants.tenantsgetusersbytenant
      with:
        tenant_id: tools.tenant_id
        limit: tools.limit
        cursor: tools.cursor
      outputParameters:
      - type: object
        mapping: $.