> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shodai.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Disable webhook

> Disables a webhook subscription for the current API principal. The signing secret is not returned after creation.



## OpenAPI

````yaml /openapi.json delete /v0/webhooks/{id}
openapi: 3.1.0
info:
  title: Agreements API
  version: v0
  description: Author, deploy, read, and advance agreements through the Agreements API.
servers:
  - url: https://test-api.shodai.network
    description: Public base URL for the Agreements API testnet environment.
  - url: https://api.shodai.network
    description: Public base URL for the Agreements API production environment.
security: []
tags:
  - name: Agreement Records
    description: List and read agreement records.
  - name: Agreement Documents
    description: Resolve hosted agreement prose documents.
  - name: Authoring
    description: Check authored agreement JSON before deployment.
  - name: Deployment
    description: Preflight and deploy agreements.
  - name: Using Agreements
    description: Read state, inspect input history, and submit signed inputs.
  - name: Webhooks
    description: Register signed push callbacks for agreement events.
  - name: System
    description: Health and OpenAPI discovery endpoints.
paths:
  /v0/webhooks/{id}:
    delete:
      tags:
        - Webhooks
      summary: Disable webhook
      description: >-
        Disables a webhook subscription for the current API principal. The
        signing secret is not returned after creation.
      operationId: deleteWebhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Webhook subscription ID.
      responses:
        '200':
          description: Disabled webhook subscription.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookSubscription'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: >-
            The authenticated API principal has paid_required entitlement mode
            for the requested scope. Per-call x402 settlement is not
            implemented. Treat this as an entitlement/operator issue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The API key is not allowed to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Webhook subscription not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WebhookSubscription:
      type: object
      required:
        - id
        - principalId
        - url
        - status
        - eventTypes
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          description: Webhook subscription ID.
        principalId:
          type: string
          description: External API principal that owns this webhook.
        createdByApiKeyId:
          type: string
          description: API key that created the webhook, for audit only.
        url:
          type: string
          format: uri
          description: HTTPS endpoint that receives signed webhook POSTs.
        status:
          type: string
          enum:
            - active
            - disabled
          description: Webhook subscription status.
        eventTypes:
          type: array
          items:
            type: string
            enum:
              - agreement.transitioned
              - agreement.notification.triggered
          description: Subscribable event types this webhook can receive.
        filters:
          $ref: '#/components/schemas/WebhookFilters'
        createdAt:
          type: string
          format: date-time
          description: Webhook creation timestamp.
        updatedAt:
          type: string
          format: date-time
          description: Webhook update timestamp.
      example:
        id: wh_123
        principalId: principal_123
        url: https://example.com/shodai/webhooks
        status: active
        eventTypes:
          - agreement.transitioned
          - agreement.notification.triggered
        filters:
          templateIds:
            - did:template:service-retainer-v0-1
          ruleIds:
            - deployment-follow-up
        createdAt: '2026-05-26T16:00:00.000Z'
        updatedAt: '2026-05-26T16:00:00.000Z'
    ResponseMeta:
      type: object
      required:
        - apiVersion
        - requestId
      properties:
        apiVersion:
          type: string
          example: v0
        requestId:
          type: string
          description: Correlation ID for support and debugging.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              example: unauthorized
              description: Stable machine-readable error code.
            message:
              type: string
              example: Missing API key
              description: Safe human-readable error summary.
            details:
              description: Optional field errors or upstream-safe context.
            requestId:
              type: string
              description: Correlation ID for support and debugging.
    WebhookFilters:
      type: object
      properties:
        agreementIds:
          type: array
          items:
            type: string
        templateIds:
          type: array
          items:
            type: string
        inputIds:
          type: array
          items:
            type: string
        fromStates:
          type: array
          items:
            type: string
        toStates:
          type: array
          items:
            type: string
        ruleIds:
          type: array
          items:
            type: string
      description: >-
        Optional filters applied before delivery. agreementIds and templateIds
        apply to both agreement.transitioned and
        agreement.notification.triggered. inputIds, fromStates, and toStates
        apply to agreement.transitioned and to notification events with
        transition data. ruleIds apply to agreement.notification.triggered
        events.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Canonical API-key credential. Send X-API-Key: cns_pk_..., or
        Authorization: Bearer cns_pk_... only as an API-key compatibility alias.
        OAuth and JWT bearer tokens are not supported.
      x-default: YOUR_API_KEY

````