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

# Replay a webhook delivery



## OpenAPI

````yaml /api-reference/account-platform-webhooks-v1.openapi.json post /v1/webhooks/deliveries/{delivery_id}/replay
openapi: 3.1.0
info:
  title: COPE Public API
  version: 1.0.0
servers:
  - url: https://api.cope.com
security: []
paths:
  /v1/webhooks/deliveries/{delivery_id}/replay:
    post:
      summary: Replay a webhook delivery
      operationId: webhooks.deliveries.replay
      parameters:
        - in: path
          name: delivery_id
          required: true
          schema:
            pattern: ^whd_[A-Za-z0-9_-]+$
            type: string
        - description: >-
            Required. At most 255 characters of valid UTF-8 with no NUL byte; a
            missing key is refused with 400 `idempotency_key_required` and a
            malformed one with 400 `invalid_idempotency_key`. A retry with the
            same key and body returns the original successful response for 24
            hours; a request that failed can be sent again under the same key.
            The same key with a different body is refused with 409
            `idempotency_key_conflict`, and while the first request is still
            running with 409 `idempotency_key_in_progress` and a `Retry-After`
            header.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 255
            minLength: 1
            type: string
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDeliveryResponse'
          description: Replayed webhook delivery
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            `idempotency_key_conflict` (the key was used with a different body)
            or `idempotency_key_in_progress` (the first request is still
            running; retry after `Retry-After`). Also `delivery_in_progress`
            (the delivery is being sent right now) or `delivery_replayed_by_job`
            (a replay job holds or has already redelivered it; `detail` names
            the delivery it became, when there is one).
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            `endpoint_disabled`, `expired` (the delivery is too old to replay),
            or `attempts_exhausted`.
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            `service_unavailable`: webhook delivery cannot take this request
            right now. Retry with backoff.
      security:
        - bearerAuth: []
components:
  schemas:
    WebhookDeliveryResponse:
      properties:
        data:
          $ref: '#/components/schemas/WebhookDelivery'
      required:
        - data
      type: object
    Problem:
      additionalProperties: false
      properties:
        code:
          type: string
        detail:
          type: string
        errors:
          items:
            additionalProperties: false
            properties:
              code:
                type: string
              detail:
                type: string
              param:
                description: >-
                  The request field refused; absent when the refusal is about
                  the request as a whole.
                type: string
            required:
              - code
              - detail
            type: object
          type: array
        request_id:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          format: uri
          type: string
      required:
        - type
        - title
        - status
        - code
        - errors
      type: object
    WebhookDelivery:
      properties:
        attempt:
          minimum: 1
          type: integer
        created_at:
          format: date-time
          type: string
        delivered_at:
          format: date-time
          type:
            - string
            - 'null'
        duration_ms:
          type:
            - integer
            - 'null'
        event_id:
          type: string
        event_type:
          type: string
        event_version:
          type: string
        id:
          pattern: ^whd_[A-Za-z0-9_-]+$
          type: string
        max_attempts:
          minimum: 1
          type: integer
        replayed_from:
          pattern: ^whd_[A-Za-z0-9_-]+$
          type:
            - string
            - 'null'
        response_status:
          type:
            - integer
            - 'null'
        status:
          enum:
            - success
            - failed
            - abandoned
          type: string
        test:
          type: boolean
      required:
        - id
        - event_id
        - event_type
        - event_version
        - status
        - response_status
        - attempt
        - max_attempts
        - duration_ms
        - test
        - delivered_at
        - created_at
        - replayed_from
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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