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

# Excluir um Endpoint de Webhook

> Delete a webhook endpoint by its ID. Future events will no longer be delivered to it.

Use este endpoint para interromper a entrega a um endpoint de webhook. A exclusão move o endpoint para o estado `deleted`, invalida seu secret de assinatura e interrompe toda entrega futura. Endpoints excluídos deixam de contar para o limite de seis endpoints.

Como não existe operação de atualização, a exclusão também é metade do caminho de atualização: registre primeiro o substituto, confirme que ele está recebendo e verificando entregas, e só então exclua o endpoint que ele substitui. Ambos os endpoints recebem os eventos correspondentes enquanto se sobrepõem, portanto seus handlers devem deduplicar pelo `id` do evento.

<Warning>
  Esta ação é terminal e não pode ser desfeita. O secret de assinatura é invalidado junto com ela, portanto um endpoint substituto recebe um secret novo e a sua configuração de verificação precisa ser atualizada.
</Warning>


## OpenAPI

````yaml openapi/spherepay.yaml DELETE /v2/webhook-endpoints/{id}
openapi: 3.0.0
info:
  contact: {}
  description: The Sphere REST API for payments, transfers, and accounts.
  title: Sphere API
  version: '2'
servers:
  - description: Production
    url: https://api.spherepay.co
security:
  - bearer: []
tags: []
paths:
  /v2/webhook-endpoints/{id}:
    delete:
      summary: Delete a Webhook Endpoint V2
      description: >-
        Delete a webhook endpoint by its ID. Future events will no longer be
        delivered to it.
      operationId: deleteV2WebhookEndpointsById
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The webhook endpoint is deleted. No content is returned.
        '400':
          content:
            application/json:
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    code: address/invalid
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    detail: Invalid request parameters
                    status: 400
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          description: Bad Request
        '404':
          content:
            application/json:
              examples:
                Not Found:
                  summary: Not Found
                  value:
                    code: resource/not-found
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    detail: Resource not found
                    status: 404
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          description: Not Found
        '422':
          content:
            application/json:
              examples:
                Validation Error:
                  summary: Validation Error
                  value:
                    code: validation/failed
                    correlationId: 28c61e885c6e5eaa78c1a2183a9b883c
                    detail: Validation failed
                    errors:
                      - detail: Invalid email format
                        pointer: /email
                      - detail: Name is required
                        pointer: /name
                    status: 422
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
          description: Unprocessable Entity - Validation Error
components:
  schemas:
    ProblemDetailsDto:
      properties:
        code:
          type: string
        correlationId:
          type: string
        detail:
          type: string
        errors:
          items:
            properties:
              detail:
                type: string
              header:
                type: string
              parameter:
                type: string
              pointer:
                type: string
            required:
              - detail
            type: object
          type: array
        status:
          type: integer
        title:
          type: string
      required:
        - status
        - detail
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````