Logto · Capability

Logto API references — Hooks

Logto API references — Hooks. 8 operations. Lead operation: Get hooks. Self-contained Naftiko capability covering one Logto business surface.

Run with Naftiko LogtoHooks

What You Can Do

GET
Listhooks — Get hooks
/v1/api/hooks
POST
Createhook — Create a hook
/v1/api/hooks
GET
Gethook — Get hook
/v1/api/hooks/{id}
PATCH
Updatehook — Update hook
/v1/api/hooks/{id}
DELETE
Deletehook — Delete hook
/v1/api/hooks/{id}
GET
Listhookrecentlogs — Get recent logs for a hook
/v1/api/hooks/{id}/recent-logs
PATCH
Updatehooksigningkey — Update signing key for a hook
/v1/api/hooks/{id}/signing-key
POST
Createhooktest — Test hook
/v1/api/hooks/{id}/test

MCP Tools

get-hooks

Get hooks

read-only idempotent
create-hook

Create a hook

get-hook

Get hook

read-only idempotent
update-hook

Update hook

idempotent
delete-hook

Delete hook

idempotent
get-recent-logs-hook

Get recent logs for a hook

read-only idempotent
update-signing-key-hook

Update signing key for a hook

idempotent
test-hook

Test hook

read-only

Capability Spec

logto-hooks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Logto API references — Hooks
  description: 'Logto API references — Hooks. 8 operations. Lead operation: Get hooks. Self-contained Naftiko capability covering
    one Logto business surface.'
  tags:
  - Logto
  - Hooks
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    LOGTO_API_KEY: LOGTO_API_KEY
capability:
  consumes:
  - type: http
    namespace: logto-hooks
    baseUri: https://[tenant_id].logto.app
    description: Logto API references — Hooks business capability. Self-contained, no shared references.
    resources:
    - name: api-hooks
      path: /api/hooks
      operations:
      - name: listhooks
        method: GET
        description: Get hooks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: includeExecutionStats
          in: query
          type: string
          description: Whether to include execution stats in the response.
        - name: page
          in: query
          type: integer
          description: Page number (starts from 1).
        - name: page_size
          in: query
          type: integer
          description: Entries per page.
      - name: createhook
        method: POST
        description: Create a hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-hooks-id
      path: /api/hooks/{id}
      operations:
      - name: gethook
        method: GET
        description: Get hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: includeExecutionStats
          in: query
          type: string
          description: Whether to include execution stats in the response.
      - name: updatehook
        method: PATCH
        description: Update hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletehook
        method: DELETE
        description: Delete hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-hooks-id-recent-logs
      path: /api/hooks/{id}/recent-logs
      operations:
      - name: listhookrecentlogs
        method: GET
        description: Get recent logs for a hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: logKey
          in: query
          type: string
          description: The log key to filter logs.
        - name: page
          in: query
          type: integer
          description: Page number (starts from 1).
        - name: page_size
          in: query
          type: integer
          description: Entries per page.
    - name: api-hooks-id-signing-key
      path: /api/hooks/{id}/signing-key
      operations:
      - name: updatehooksigningkey
        method: PATCH
        description: Update signing key for a hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-hooks-id-test
      path: /api/hooks/{id}/test
      operations:
      - name: createhooktest
        method: POST
        description: Test hook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.LOGTO_API_KEY}}'
  exposes:
  - type: rest
    namespace: logto-hooks-rest
    port: 8080
    description: REST adapter for Logto API references — Hooks. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/hooks
      name: api-hooks
      description: REST surface for api-hooks.
      operations:
      - method: GET
        name: listhooks
        description: Get hooks
        call: logto-hooks.listhooks
        with:
          includeExecutionStats: rest.includeExecutionStats
          page: rest.page
          page_size: rest.page_size
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createhook
        description: Create a hook
        call: logto-hooks.createhook
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/hooks/{id}
      name: api-hooks-id
      description: REST surface for api-hooks-id.
      operations:
      - method: GET
        name: gethook
        description: Get hook
        call: logto-hooks.gethook
        with:
          includeExecutionStats: rest.includeExecutionStats
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatehook
        description: Update hook
        call: logto-hooks.updatehook
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletehook
        description: Delete hook
        call: logto-hooks.deletehook
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/hooks/{id}/recent-logs
      name: api-hooks-id-recent-logs
      description: REST surface for api-hooks-id-recent-logs.
      operations:
      - method: GET
        name: listhookrecentlogs
        description: Get recent logs for a hook
        call: logto-hooks.listhookrecentlogs
        with:
          logKey: rest.logKey
          page: rest.page
          page_size: rest.page_size
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/hooks/{id}/signing-key
      name: api-hooks-id-signing-key
      description: REST surface for api-hooks-id-signing-key.
      operations:
      - method: PATCH
        name: updatehooksigningkey
        description: Update signing key for a hook
        call: logto-hooks.updatehooksigningkey
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/hooks/{id}/test
      name: api-hooks-id-test
      description: REST surface for api-hooks-id-test.
      operations:
      - method: POST
        name: createhooktest
        description: Test hook
        call: logto-hooks.createhooktest
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: logto-hooks-mcp
    port: 9090
    transport: http
    description: MCP adapter for Logto API references — Hooks. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-hooks
      description: Get hooks
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: logto-hooks.listhooks
      with:
        includeExecutionStats: tools.includeExecutionStats
        page: tools.page
        page_size: tools.page_size
      outputParameters:
      - type: object
        mapping: $.
    - name: create-hook
      description: Create a hook
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: logto-hooks.createhook
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-hook
      description: Get hook
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: logto-hooks.gethook
      with:
        includeExecutionStats: tools.includeExecutionStats
      outputParameters:
      - type: object
        mapping: $.
    - name: update-hook
      description: Update hook
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: logto-hooks.updatehook
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-hook
      description: Delete hook
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: logto-hooks.deletehook
      outputParameters:
      - type: object
        mapping: $.
    - name: get-recent-logs-hook
      description: Get recent logs for a hook
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: logto-hooks.listhookrecentlogs
      with:
        logKey: tools.logKey
        page: tools.page
        page_size: tools.page_size
      outputParameters:
      - type: object
        mapping: $.
    - name: update-signing-key-hook
      description: Update signing key for a hook
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: logto-hooks.updatehooksigningkey
      outputParameters:
      - type: object
        mapping: $.
    - name: test-hook
      description: Test hook
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: logto-hooks.createhooktest
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.