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

# Reenviar uma Entrega de Evento com Falha

> Redeliver an event to its webhook endpoint by the ID of a prior delivery attempt.

Use este endpoint para reenviar uma entrega ao seu endpoint de webhook. O SpherePay faz exatamente uma tentativa automática por evento e por endpoint, e nunca tenta novamente por conta própria, portanto recuperar uma entrega que falhou enquanto seu endpoint estava fora do ar é uma chamada deliberada a este endpoint.

O caminho recebe o ID da **entrega**, não o ID do evento. Encontre-o no objeto `delivery` retornado por [listar eventos](/pt-BR/api-reference/events/get) ou no histórico completo de [obter evento](/pt-BR/api-reference/events/get-id), ou leia-o do header `Sphere-Delivery-Id` da requisição original.

Um replay reenvia o payload idêntico byte a byte com um `Sphere-Timestamp` e um `Sphere-Signature` novos, mais os headers `Sphere-Delivery-Type: replay` e `Sphere-Replay-Reason: manual`. Seu caminho de código de verificação é o mesmo para originais e replays. Um replay bem-sucedido move a entrega para `delivered`; um com falha a deixa em `failed` e registra outra tentativa. O histórico de tentativas é preservado em qualquer caso.

<Warning>
  Replays são entregues pelo menos uma vez em cima do que seu endpoint já recebeu, e uma entrega que já teve êxito pode ser reenviada. Deduplique pelo `id` do evento e aplique a [verificação de obsolescência de `sequence`](/pt-BR/concepts/webhooks/event-payloads#the-sequence-field) para que um replay seja sempre seguro de receber.
</Warning>


## OpenAPI

````yaml openapi/spherepay.yaml POST /v2/events/replay/{eventDeliveryId}
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/events/replay/{eventDeliveryId}:
    post:
      summary: Replay an Event Delivery V2
      description: >-
        Redeliver an event to its webhook endpoint by the ID of a prior delivery
        attempt.
      operationId: postV2EventsReplayByEventDeliveryId
      parameters:
        - in: path
          name: eventDeliveryId
          required: true
          schema:
            type: string
      responses:
        '201':
          description: >-
            The replay is queued for delivery. No content is returned; poll the
            event to observe the new attempt.
        '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

````