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

# Delete a webhook

> Permanently delete a webhook subscription.



## OpenAPI

````yaml /api-reference/v1/webhooks-v1.yaml delete /webhooks/{webhook_id}
openapi: 3.0.3
info:
  title: Coval Webhooks API
  version: 1.0.0
  description: |

    Register HTTP callbacks that Coval invokes when events occur in your
    organization. A `job_complete` webhook is POSTed when a run finishes.

    The optional `auth_token` is stored securely and sent by Coval when it
    calls your endpoint; it is never returned by this API. Responses expose
    `has_auth_token` so you can tell whether a token is configured.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Webhooks
    description: CRUD operations for event webhooks
paths:
  /webhooks/{webhook_id}:
    delete:
      tags:
        - Webhooks
      summary: Delete a webhook
      description: Permanently delete a webhook subscription.
      operationId: deleteWebhook
      parameters:
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
          description: Webhook resource ID
      responses:
        '200':
          description: Webhook deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteWebhookResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/PermissionDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DeleteWebhookResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: True when the webhook was deleted
          example: true
    ErrorResponse:
      type: object
      description: Standard error response
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              description: Error code enum
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - PERMISSION_DENIED
                - NOT_FOUND
                - ALREADY_EXISTS
                - INTERNAL
              example: NOT_FOUND
            message:
              type: string
              description: Human-readable error message
              example: Webhook not found
            details:
              type: array
              description: Detailed error information
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                    description: Field name that caused the error
                    example: webhook_id
                  description:
                    type: string
                    description: Detailed error description
                    example: Webhook abc123 not found
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    PermissionDenied:
      description: API key lacks required permission scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: PERMISSION_DENIED
              message: Insufficient permissions
              details:
                - field: permissions
                  description: 'API key does not have required permission: webhooks:write'
    NotFound:
      description: The webhook does not exist or is not accessible
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Webhook not found
              details:
                - field: webhook_id
                  description: Webhook abc123 not found
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred
    ServiceUnavailable:
      description: >-
        Service temporarily unavailable (transient organization DB routing
        outage; retryable)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Service temporarily unavailable
              details:
                - description: Database routing is temporarily unavailable. Please retry.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````