> ## 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.

# Send test webhook

> Sends a signed test payload to a webhook subscription. The signing secret is not returned after creation.



## OpenAPI

````yaml /openapi.json post /v0/webhooks/{id}/test
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}/test:
    post:
      tags:
        - Webhooks
      summary: Send test webhook
      description: >-
        Sends a signed test payload to a webhook subscription. The signing
        secret is not returned after creation.
      operationId: testWebhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Webhook subscription ID.
      responses:
        '201':
          description: Test delivery was queued and attempted.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookTestResponse'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
              examples:
                testDelivery:
                  summary: Webhook test delivery result
                  value:
                    data:
                      ok: true
                      deliveryId: whd_123
                      status: succeeded
                      responseStatus: 204
                    meta:
                      apiVersion: v0
                      requestId: req_123
        '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:
    WebhookTestResponse:
      type: object
      required:
        - ok
        - deliveryId
        - status
      properties:
        ok:
          type: boolean
          description: True only when the immediate test delivery attempt succeeded.
        deliveryId:
          type: string
          description: Delivery record ID for the test send.
        status:
          type: string
          enum:
            - pending
            - succeeded
            - failed
            - retry_pending
          description: Recorded status after the immediate test delivery attempt.
        responseStatus:
          type: number
          description: HTTP status returned by the webhook receiver when available.
        error:
          type: string
          description: Failure reason recorded for failed or retry-pending test deliveries.
      example:
        ok: true
        deliveryId: whd_123
        status: succeeded
        responseStatus: 204
    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.
  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

````