curl --request POST \
--url https://api.centaur.io/v1/webhooks/{id}/replay \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"from": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.centaur.io/v1/webhooks/{id}/replay"
payload = { "from": "2023-11-07T05:31:56Z" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({from: '2023-11-07T05:31:56Z'})
};
fetch('https://api.centaur.io/v1/webhooks/{id}/replay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.centaur.io/v1/webhooks/{id}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.centaur.io/v1/webhooks/{id}/replay"
payload := strings.NewReader("{\n \"from\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.centaur.io/v1/webhooks/{id}/replay")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centaur.io/v1/webhooks/{id}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"released": 3,
"reenqueued": 12
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "API key lacks webhooks.manage permission"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Webhook endpoint not found"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "ENDPOINT_NOT_ACTIVE",
"message": "Only an active endpoint can be replayed. Resume or re-enable it first."
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "REPLAY_RATE_LIMITED",
"message": "One replay per endpoint every 60 seconds. Retry in 42 seconds."
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "AUTHENTICATION_UNAVAILABLE",
"message": "Authentication is temporarily unavailable"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}Replay webhook deliveries
Sends a range of past deliveries again, starting from a time or a sequence number. Held deliveries are released; succeeded and dead deliveries are queued again as new deliveries with the same event id, so deduplicate on it.
curl --request POST \
--url https://api.centaur.io/v1/webhooks/{id}/replay \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"from": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.centaur.io/v1/webhooks/{id}/replay"
payload = { "from": "2023-11-07T05:31:56Z" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({from: '2023-11-07T05:31:56Z'})
};
fetch('https://api.centaur.io/v1/webhooks/{id}/replay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.centaur.io/v1/webhooks/{id}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.centaur.io/v1/webhooks/{id}/replay"
payload := strings.NewReader("{\n \"from\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.centaur.io/v1/webhooks/{id}/replay")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centaur.io/v1/webhooks/{id}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"released": 3,
"reenqueued": 12
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "API key lacks webhooks.manage permission"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Webhook endpoint not found"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "ENDPOINT_NOT_ACTIVE",
"message": "Only an active endpoint can be replayed. Resume or re-enable it first."
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "REPLAY_RATE_LIMITED",
"message": "One replay per endpoint every 60 seconds. Retry in 42 seconds."
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}{
"success": false,
"error": {
"code": "AUTHENTICATION_UNAVAILABLE",
"message": "Authentication is temporarily unavailable"
},
"requestId": "c8e2c6e4-80dd-4ffc-9d66-4e31bf64c6b8"
}Authorizations
API key issued by Centaur.
Path Parameters
Endpoint ID.
Body
- Option 1
- Option 2
The start of the range to replay: from (ISO-8601 time) or fromSequence. Within the range, held deliveries are released in place, succeeded and dead deliveries are queued again as new deliveries with the same event id (deduplicate on it), and deliveries already pending or in flight are left alone. The endpoint must be ACTIVE. A replay that queues deliveries again can run once per 60 seconds per endpoint.
Replay deliveries created at or after this time. At most 7 days ago, the retention window.