CircleCI · Capability

CircleCI REST API v2 — Webhook

CircleCI REST API v2 — Webhook. 5 operations. Lead operation: List webhooks. Self-contained Naftiko capability covering one Circleci business surface.

Run with Naftiko CircleciWebhook

What You Can Do

GET
Listwebhooks — List webhooks
/v1/webhook
POST
Createwebhook — Create a webhook
/v1/webhook
GET
Getwebhook — Get a webhook by ID
/v1/webhook/{webhook-id}
PUT
Updatewebhook — Update a webhook
/v1/webhook/{webhook-id}
DELETE
Deletewebhook — Delete a webhook
/v1/webhook/{webhook-id}

MCP Tools

list-webhooks

List webhooks

read-only idempotent
create-webhook

Create a webhook

get-webhook-id

Get a webhook by ID

read-only idempotent
update-webhook

Update a webhook

idempotent
delete-webhook

Delete a webhook

idempotent

Capability Spec

rest-api-v2-webhook.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CircleCI REST API v2 — Webhook
  description: 'CircleCI REST API v2 — Webhook. 5 operations. Lead operation: List webhooks. Self-contained Naftiko capability
    covering one Circleci business surface.'
  tags:
  - Circleci
  - Webhook
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CIRCLECI_API_KEY: CIRCLECI_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-api-v2-webhook
    baseUri: https://circleci.com/api/v2
    description: CircleCI REST API v2 — Webhook business capability. Self-contained, no shared references.
    resources:
    - name: webhook
      path: /webhook
      operations:
      - name: listwebhooks
        method: GET
        description: List webhooks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: scope-id
          in: query
          type: string
          description: The ID of the scope (project ID)
          required: true
        - name: scope-type
          in: query
          type: string
          description: The type of scope
          required: true
      - name: createwebhook
        method: POST
        description: Create a webhook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: webhook-webhook-id
      path: /webhook/{webhook-id}
      operations:
      - name: getwebhook
        method: GET
        description: Get a webhook by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatewebhook
        method: PUT
        description: Update a webhook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletewebhook
        method: DELETE
        description: Delete a webhook
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: Circle-Token
      value: '{{env.CIRCLECI_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: rest-api-v2-webhook-rest
    port: 8080
    description: REST adapter for CircleCI REST API v2 — Webhook. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/webhook
      name: webhook
      description: REST surface for webhook.
      operations:
      - method: GET
        name: listwebhooks
        description: List webhooks
        call: rest-api-v2-webhook.listwebhooks
        with:
          scope-id: rest.scope-id
          scope-type: rest.scope-type
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createwebhook
        description: Create a webhook
        call: rest-api-v2-webhook.createwebhook
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/webhook/{webhook-id}
      name: webhook-webhook-id
      description: REST surface for webhook-webhook-id.
      operations:
      - method: GET
        name: getwebhook
        description: Get a webhook by ID
        call: rest-api-v2-webhook.getwebhook
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatewebhook
        description: Update a webhook
        call: rest-api-v2-webhook.updatewebhook
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletewebhook
        description: Delete a webhook
        call: rest-api-v2-webhook.deletewebhook
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-api-v2-webhook-mcp
    port: 9090
    transport: http
    description: MCP adapter for CircleCI REST API v2 — Webhook. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-webhooks
      description: List webhooks
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-api-v2-webhook.listwebhooks
      with:
        scope-id: tools.scope-id
        scope-type: tools.scope-type
      outputParameters:
      - type: object
        mapping: $.
    - name: create-webhook
      description: Create a webhook
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-api-v2-webhook.createwebhook
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-webhook-id
      description: Get a webhook by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-api-v2-webhook.getwebhook
      outputParameters:
      - type: object
        mapping: $.
    - name: update-webhook
      description: Update a webhook
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-api-v2-webhook.updatewebhook
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-webhook
      description: Delete a webhook
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-api-v2-webhook.deletewebhook
      outputParameters:
      - type: object
        mapping: $.