curl --request POST \
--url https://api.dairo.app/v1/events/replay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"since": "<string>",
"sinceSeq": 123,
"inboxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceTimestamp": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z",
"types": [
"<string>"
],
"webhookId": "<string>",
"maxEvents": 1000
}
'import requests
url = "https://api.dairo.app/v1/events/replay"
payload = {
"since": "<string>",
"sinceSeq": 123,
"inboxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceTimestamp": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z",
"types": ["<string>"],
"webhookId": "<string>",
"maxEvents": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
since: '<string>',
sinceSeq: 123,
inboxId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sinceTimestamp: '2023-11-07T05:31:56Z',
until: '2023-11-07T05:31:56Z',
types: ['<string>'],
webhookId: '<string>',
maxEvents: 1000
})
};
fetch('https://api.dairo.app/v1/events/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.dairo.app/v1/events/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([
'since' => '<string>',
'sinceSeq' => 123,
'inboxId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sinceTimestamp' => '2023-11-07T05:31:56Z',
'until' => '2023-11-07T05:31:56Z',
'types' => [
'<string>'
],
'webhookId' => '<string>',
'maxEvents' => 1000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.dairo.app/v1/events/replay"
payload := strings.NewReader("{\n \"since\": \"<string>\",\n \"sinceSeq\": 123,\n \"inboxId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sinceTimestamp\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\",\n \"types\": [\n \"<string>\"\n ],\n \"webhookId\": \"<string>\",\n \"maxEvents\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.dairo.app/v1/events/replay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"since\": \"<string>\",\n \"sinceSeq\": 123,\n \"inboxId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sinceTimestamp\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\",\n \"types\": [\n \"<string>\"\n ],\n \"webhookId\": \"<string>\",\n \"maxEvents\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dairo.app/v1/events/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"since\": \"<string>\",\n \"sinceSeq\": 123,\n \"inboxId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sinceTimestamp\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\",\n \"types\": [\n \"<string>\"\n ],\n \"webhookId\": \"<string>\",\n \"maxEvents\": 1000\n}"
response = http.request(request)
puts response.read_body{
"replayed": 123,
"skipped": 123,
"from": {
"eventId": "<string>",
"seq": 123,
"partitionKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"to": {
"eventId": "<string>",
"seq": 123,
"partitionKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}Replay events from the ledger to webhooks
Replay events from the ledger to webhooks
curl --request POST \
--url https://api.dairo.app/v1/events/replay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"since": "<string>",
"sinceSeq": 123,
"inboxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceTimestamp": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z",
"types": [
"<string>"
],
"webhookId": "<string>",
"maxEvents": 1000
}
'import requests
url = "https://api.dairo.app/v1/events/replay"
payload = {
"since": "<string>",
"sinceSeq": 123,
"inboxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceTimestamp": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z",
"types": ["<string>"],
"webhookId": "<string>",
"maxEvents": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
since: '<string>',
sinceSeq: 123,
inboxId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sinceTimestamp: '2023-11-07T05:31:56Z',
until: '2023-11-07T05:31:56Z',
types: ['<string>'],
webhookId: '<string>',
maxEvents: 1000
})
};
fetch('https://api.dairo.app/v1/events/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.dairo.app/v1/events/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([
'since' => '<string>',
'sinceSeq' => 123,
'inboxId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sinceTimestamp' => '2023-11-07T05:31:56Z',
'until' => '2023-11-07T05:31:56Z',
'types' => [
'<string>'
],
'webhookId' => '<string>',
'maxEvents' => 1000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.dairo.app/v1/events/replay"
payload := strings.NewReader("{\n \"since\": \"<string>\",\n \"sinceSeq\": 123,\n \"inboxId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sinceTimestamp\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\",\n \"types\": [\n \"<string>\"\n ],\n \"webhookId\": \"<string>\",\n \"maxEvents\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.dairo.app/v1/events/replay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"since\": \"<string>\",\n \"sinceSeq\": 123,\n \"inboxId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sinceTimestamp\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\",\n \"types\": [\n \"<string>\"\n ],\n \"webhookId\": \"<string>\",\n \"maxEvents\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dairo.app/v1/events/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"since\": \"<string>\",\n \"sinceSeq\": 123,\n \"inboxId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sinceTimestamp\": \"2023-11-07T05:31:56Z\",\n \"until\": \"2023-11-07T05:31:56Z\",\n \"types\": [\n \"<string>\"\n ],\n \"webhookId\": \"<string>\",\n \"maxEvents\": 1000\n}"
response = http.request(request)
puts response.read_body{
"replayed": 123,
"skipped": 123,
"from": {
"eventId": "<string>",
"seq": 123,
"partitionKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"to": {
"eventId": "<string>",
"seq": 123,
"partitionKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}Authorizations
Dairo API key, e.g. dairo_test_... or dairo_live_...
Body
Selects a ledger slice to re-deliver. Provide exactly one lower bound: since (an opaque cursor from GET /v1/events), sinceSeq (+inboxId, replay one partition from a seq), or sinceTimestamp (RFC3339).
Opaque keyset cursor (from GET /v1/events) to replay forward from.
Replay one partition starting at this seq (inclusive). Requires inboxId.
Scope the replay to one inbox partition (required with sinceSeq; an optional filter otherwise).
Replay events created at or after this RFC3339 timestamp.
Optional upper bound (events created at or before this RFC3339 timestamp).
Optional event-type filter, e.g. ["email.bounced"].
Optional: replay only to this one webhook subscription; otherwise to every matching active subscription.
Hard cap on the slice size. A slice that exceeds the cap is rejected with 400 asking the caller to page with until/maxEvents.
1 <= x <= 5000