Knock · Capability

Knock API — Tenants

Knock API — Tenants. 6 operations. Lead operation: List tenants. Self-contained Naftiko capability covering one Knock business surface.

Run with Naftiko KnockTenants

What You Can Do

GET
Listtenants — List tenants
/v1/v1/tenants
POST
Bulkdeletetenants — Bulk delete tenants
/v1/v1/tenants/bulk/delete
POST
Bulksettenants — Bulk set tenants
/v1/v1/tenants/bulk/set
DELETE
Deletetenant — Delete a tenant
/v1/v1/tenants/{id}
GET
Gettenant — Get a tenant
/v1/v1/tenants/{id}
PUT
Settenant — Set a tenant
/v1/v1/tenants/{id}

MCP Tools

list-tenants

List tenants

read-only idempotent
bulk-delete-tenants

Bulk delete tenants

bulk-set-tenants

Bulk set tenants

delete-tenant

Delete a tenant

idempotent
get-tenant

Get a tenant

read-only idempotent
set-tenant

Set a tenant

idempotent

Capability Spec

knock-tenants.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Knock API — Tenants
  description: 'Knock API — Tenants. 6 operations. Lead operation: List tenants. Self-contained Naftiko capability covering
    one Knock business surface.'
  tags:
  - Knock
  - Tenants
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KNOCK_API_KEY: KNOCK_API_KEY
capability:
  consumes:
  - type: http
    namespace: knock-tenants
    baseUri: https://api.knock.app
    description: Knock API — Tenants business capability. Self-contained, no shared references.
    resources:
    - name: v1-tenants
      path: /v1/tenants
      operations:
      - name: listtenants
        method: GET
        description: List tenants
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_id
          in: query
          type: string
          description: Filter tenants by ID.
        - name: name
          in: query
          type: string
          description: Filter tenants by name.
        - 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: v1-tenants-bulk-delete
      path: /v1/tenants/bulk/delete
      operations:
      - name: bulkdeletetenants
        method: POST
        description: Bulk delete tenants
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant_ids[]
          in: query
          type: array
          description: The IDs of the tenants to delete.
          required: true
    - name: v1-tenants-bulk-set
      path: /v1/tenants/bulk/set
      operations:
      - name: bulksettenants
        method: POST
        description: Bulk set tenants
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-tenants-id
      path: /v1/tenants/{id}
      operations:
      - name: deletetenant
        method: DELETE
        description: Delete a tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique identifier for the tenant.
          required: true
      - name: gettenant
        method: GET
        description: Get a tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique identifier for the tenant.
          required: true
        - name: resolve_full_preference_settings
          in: query
          type: boolean
          description: When true, merges environment-level default preferences into the tenant's `settings.preference_set`
            field before returning the response. Defaults to false.
      - name: settenant
        method: PUT
        description: Set a tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique identifier for the tenant.
          required: true
        - name: resolve_full_preference_settings
          in: query
          type: boolean
          description: When true, merges environment-level default preferences into the tenant's `settings.preference_set`
            field before returning the response. Defaults to false.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.KNOCK_API_KEY}}'
  exposes:
  - type: rest
    namespace: knock-tenants-rest
    port: 8080
    description: REST adapter for Knock API — Tenants. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/v1/tenants
      name: v1-tenants
      description: REST surface for v1-tenants.
      operations:
      - method: GET
        name: listtenants
        description: List tenants
        call: knock-tenants.listtenants
        with:
          tenant_id: rest.tenant_id
          name: rest.name
          after: rest.after
          before: rest.before
          page_size: rest.page_size
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tenants/bulk/delete
      name: v1-tenants-bulk-delete
      description: REST surface for v1-tenants-bulk-delete.
      operations:
      - method: POST
        name: bulkdeletetenants
        description: Bulk delete tenants
        call: knock-tenants.bulkdeletetenants
        with:
          tenant_ids[]: rest.tenant_ids[]
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tenants/bulk/set
      name: v1-tenants-bulk-set
      description: REST surface for v1-tenants-bulk-set.
      operations:
      - method: POST
        name: bulksettenants
        description: Bulk set tenants
        call: knock-tenants.bulksettenants
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/tenants/{id}
      name: v1-tenants-id
      description: REST surface for v1-tenants-id.
      operations:
      - method: DELETE
        name: deletetenant
        description: Delete a tenant
        call: knock-tenants.deletetenant
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: gettenant
        description: Get a tenant
        call: knock-tenants.gettenant
        with:
          id: rest.id
          resolve_full_preference_settings: rest.resolve_full_preference_settings
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: settenant
        description: Set a tenant
        call: knock-tenants.settenant
        with:
          id: rest.id
          resolve_full_preference_settings: rest.resolve_full_preference_settings
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: knock-tenants-mcp
    port: 9090
    transport: http
    description: MCP adapter for Knock API — Tenants. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-tenants
      description: List tenants
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: knock-tenants.listtenants
      with:
        tenant_id: tools.tenant_id
        name: tools.name
        after: tools.after
        before: tools.before
        page_size: tools.page_size
      outputParameters:
      - type: object
        mapping: $.
    - name: bulk-delete-tenants
      description: Bulk delete tenants
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: knock-tenants.bulkdeletetenants
      with:
        tenant_ids[]: tools.tenant_ids[]
      outputParameters:
      - type: object
        mapping: $.
    - name: bulk-set-tenants
      description: Bulk set tenants
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: knock-tenants.bulksettenants
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-tenant
      description: Delete a tenant
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: knock-tenants.deletetenant
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-tenant
      description: Get a tenant
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: knock-tenants.gettenant
      with:
        id: tools.id
        resolve_full_preference_settings: tools.resolve_full_preference_settings
      outputParameters:
      - type: object
        mapping: $.
    - name: set-tenant
      description: Set a tenant
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: knock-tenants.settenant
      with:
        id: tools.id
        resolve_full_preference_settings: tools.resolve_full_preference_settings
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.