> For the complete documentation index, see [llms.txt](https://docs.lhv.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lhv.com/home/connect/services/webhooks/webhook-services/replay-webhooks.md).

# Replay webhook messages

## Service Description

This service allows replaying webhook messages by submitting a list of `eventIds`. Event ID can be requested using [Get list of webhook messages](/home/connect/services/webhooks/webhook-services/get-list-of-webhook-messages.md) service.

New webhook messages are dispatched to the originally configured endpoints, regardless of the original delivery status. Messages with the status `Retry Pending` can be replayed; doing so will cancel the scheduled retry and create a new webhook message with a new `eventId`.  Webhooks that were successfully delivered can also be replayed, provided they are no older than 5 days (120 hours).

Invalid or unknown `eventIds` are skipped and reported in the response. A summary is returned indicating which events were successfully dispatched and which were not.

## Request

<mark style="color:green;">`POST`</mark> <https://connect.lhv.com/notifications/replay>

Example request

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "eventIds": [
    "f9b1c178-dca4-4e71-85c3-53922b77110e",
    "3a23b238-8729-45df-a3d0-3f6b37b3e3aa",
    "9b5b5b5c-8147-4f13-981d-bfd41bc91f44"
  ]
}
</code></pre>

## Response

Example response

{% tabs %}
{% tab title="200 - success" %}

```json
{
  "dispatched": [
    {
      "eventId": "f9b1c178-dca4-4e71-85c3-53922b77110e"
    },
    {
      "eventId": "3a23b238-8729-45df-a3d0-3f6b37b3e3aa"
    }
    {
      "eventId": "9b5b5b5c-8147-4f13-981d-bfd41bc91f44"
    }
  ],
  "failed": []
}
```

{% endtab %}

{% tab title="400 - fail" %}
{% code overflow="wrap" %}

```json
{
  "dispatched": [],
  "failed": [
    {
      "eventId": "f9b1c178-dca4-4e71-85c3-53922b77110e",
      "error": "Cannot replay webhook. No valid and active webhook configuration found for webhook response with eventId: f9b1c178-dca4-4e71-85c3-53922b77110e"
    },
    {
      "eventId": "3a23b238-8729-45df-a3d0-3f6b37b3e3aa",
      "error": "Cannot replay webhook. WebhookResponse not found for contract 123 and webhook eventId: 3a23b238-8729-45df-a3d0-3f6b37b3e3aa"
    }
    {
      "eventId": "9b5b5b5c-8147-4f13-981d-bfd41bc91f44",
      "error": "Cannot replay webhook. WebhookResponse not found for contract 123 and webhook eventId: 9b5b5b5c-8147-4f13-981d-bfd41bc91f44"
    }
  ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lhv.com/home/connect/services/webhooks/webhook-services/replay-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
