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

# Delete Webhook Endpoint

> Delete a webhook endpoint.



## OpenAPI

````yaml POST /webhook-endpoints/{id}/delete
openapi: 3.1.0
info:
  title: Knot API
  description: An API to interact with the Knot merchant connectivity platform.
  version: 1.0.0
servers:
  - url: https://development.knotapi.com
    description: Development server
security:
  - basicAuth: []
paths:
  /webhook-endpoints/{id}/delete:
    servers:
      - url: https://api.dashboard.knotapi.com
    post:
      summary: Delete Webhook Endpoint
      description: Delete a webhook endpoint.
      operationId: webhook_endpoint_delete
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: 0a8f5c6e-3d2b-4e1a-9f7c-8b6d5e4c3a21
          description: Unique identifier for the webhook endpoint.
      requestBody:
        description: The input parameters required for deleting a webhook endpoint.
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                  description: >-
                    The environment the webhook endpoint belongs to. Must match
                    your access token's environment.
                  enum:
                    - development
                    - production
                  example: development
              required:
                - environment
            examples:
              DeleteWebhookEndpoint:
                summary: Delete a webhook endpoint
                value:
                  environment: development
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message.
                    example: Success
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NotFound:
                  summary: Webhook endpoint not found
                  value:
                    error_type: WEBHOOK_ENDPOINT_ERROR
                    error_code: WEBHOOK_ENDPOINT_NOT_FOUND
                    error_message: >-
                      The webhook endpoint was not found. Please check the ID
                      and environment provided.
                EnvironmentRequired:
                  summary: environment is required
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The environment field is required.
                EnvironmentInvalid:
                  summary: environment is invalid
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The selected environment is invalid.
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidAccessToken:
                  summary: Invalid or expired access token
                  value:
                    error_type: INVALID_INPUT
                    error_code: INVALID_ACCESS_TOKEN
                    error_message: >-
                      The access token is invalid or has expired. Request a new
                      access token.
        '403':
          description: Forbidden request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InsufficientScope:
                  summary: Missing scope
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INSUFFICIENT_SCOPE
                    error_message: >-
                      The access token does not include the webhooks:write
                      scope.
                InsufficientRole:
                  summary: Role cannot manage production webhook endpoints
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INSUFFICIENT_ROLE
                    error_message: >-
                      Only Owners and Admins can manage production webhook
                      endpoints.
                EnvironmentMismatch:
                  summary: Access token is for another environment
                  value:
                    error_type: INVALID_REQUEST
                    error_code: ENVIRONMENT_MISMATCH
                    error_message: >-
                      This access token can only manage development webhook
                      endpoints. Request a new access token with your production
                      client_id.
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                RateLimitExceeded:
                  summary: Rate limit exceeded
                  value:
                    error_type: INVALID_REQUEST
                    error_code: RATE_LIMIT_EXCEEDED
                    error_message: Too many requests. Retry after 30 seconds.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InternalServerError:
                  summary: Unexpected server error
                  value:
                    message: Server Error
      security:
        - agentAccessToken:
            - webhooks:write
components:
  schemas:
    Error:
      type: object
      properties:
        error_type:
          type: string
          description: Type of error.
          enum:
            - INVALID_INPUT
            - INVALID_REQUEST
            - USER_ERROR
            - SESSION_ERROR
            - MERCHANT_ACCOUNT_ERROR
            - MERCHANT_ERROR
            - SUBSCRIPTION_ERROR
            - TRANSACTION_ERROR
            - CART_ERROR
            - WEBHOOK_ENDPOINT_ERROR
          example: INVALID_REQUEST
        error_code:
          type: string
          description: Error code.
          enum:
            - INVALID_API_KEYS
            - INVALID_FIELD
            - INVALID_JWE
            - INVALID_CURSOR_FORMAT
            - USER_NOT_FOUND
            - MERCHANT_ACCOUNT_NOT_FOUND
            - MERCHANT_ACCOUNT_DISCONNECTED
            - SESSION_NOT_FOUND
            - EXTEND_NOT_SUPPORTED
            - MERCHANT_UNAVAILABLE
            - NO_ACCESS
            - TRANSACTION_NOT_FOUND
            - NO_TRANSACTIONS
            - SUBSCRIPTION_NOT_FOUND
            - CANCELLABLE_SUBSCRIPTION_NOT_FOUND
            - MULTIPLE_CANCELLABLE_SUBSCRIPTIONS_FOUND
            - ONGOING_OPERATION
            - CART_NOT_FOUND
            - FULFILLMENT_NOT_FOUND
            - INVALID_ACCESS_TOKEN
            - INSUFFICIENT_SCOPE
            - INSUFFICIENT_ROLE
            - WEBHOOK_ENDPOINT_NOT_FOUND
            - WEBHOOK_ENDPOINT_LIMIT_REACHED
            - WEBHOOK_ENDPOINT_ALREADY_EXISTS
            - RATE_LIMIT_EXCEEDED
            - ENVIRONMENT_MISMATCH
          example: INVALID_FIELD
        error_message:
          type: string
          description: Detailed error message.
          example: The limit may not be greater than 10.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication header of the form `Basic <encoded-value>`, where
        `<encoded-value>` is the base64-encoded string `username:password`. Use
        your `client_id` as the `username` and your `secret` as the `password`
        value.
    agentAccessToken:
      type: http
      scheme: bearer
      description: >-
        Short-lived access token from the [device authorization
        flow](/api-reference/agent-authorization/overview). Expires after 15
        minutes. Manages only the environment of the client ID it was issued
        for.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.