Create replay job
Replay historical events from a time range to a destination.
POST
/replay
Replay historical events from a time range to a destination.
Authentication
API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)
Request Body required
Request body
application/jsonsource_id
string
Filter events by source ID
destination_id
string
REQUIRED
Target destination for replayed events
connection_id
string
Optional connection ID for context
from
string
REQUIRED
Start of time range (ISO 8601)
to
string
REQUIRED
End of time range (ISO 8601)
filter
object
Optional filter criteria
rate_limit
integer
Events per second (default 10, max 100)
max_events
integer
Maximum events to replay (default 1000, max 10000)
Responses
201
Replay job created
application/jsonjob
object
REQUIRED
id
string
REQUIRED
status
string
REQUIRED
total
number
REQUIRED
400
Bad request
401
Unauthorized
404
Destination or events not found
curl -X POST 'https://hookstream.io/v1/replay' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"source_id": "string",
"destination_id": "string",
"connection_id": "string",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-07T23:59:59Z",
"filter": {},
"rate_limit": 10,
"max_events": 1000
}'
const response = await fetch('https://hookstream.io/v1/replay', {
method: 'POST',
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"source_id": "string",
"destination_id": "string",
"connection_id": "string",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-07T23:59:59Z",
"filter": {},
"rate_limit": 10,
"max_events": 1000
})
});
const data = await response.json();
console.log(data);
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
response = requests.post('https://hookstream.io/v1/replay', headers=headers, json={
"source_id": "string",
"destination_id": "string",
"connection_id": "string",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-07T23:59:59Z",
"filter": {},
"rate_limit": 10,
"max_events": 1000
})
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"source_id": "string",
"destination_id": "string",
"connection_id": "string",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-07T23:59:59Z",
"filter": {},
"rate_limit": 10,
"max_events": 1000
}`)
req, _ := http.NewRequest("POST", "https://hookstream.io/v1/replay", body)
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}
201
Response
{
"job": {
"id": "<string>",
"status": "<string>",
"total": 123
}
}
POST
/replay