Replay an event to a target (records a delivery attempt)
curl --request POST \
--url https://api.webhook.co/v1/events/{eventId}/replay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"kind": "localhost-tunnel",
"sessionId": "<string>"
},
"idempotencyKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target: {kind: 'localhost-tunnel', sessionId: '<string>'},
idempotencyKey: '<string>'
})
};
fetch('https://api.webhook.co/v1/events/{eventId}/replay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webhook.co/v1/events/{eventId}/replay"
payload = {
"target": {
"kind": "localhost-tunnel",
"sessionId": "<string>"
},
"idempotencyKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.webhook.co/v1/events/{eventId}/replay"
payload := strings.NewReader("{\n \"target\": {\n \"kind\": \"localhost-tunnel\",\n \"sessionId\": \"<string>\"\n },\n \"idempotencyKey\": \"<string>\"\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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": "<string>",
"idempotencyKey": "<string>",
"status": "queued",
"statusCode": 0,
"attempt": 123,
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}"<string>"{
"error": "<string>",
"message": "<string>"
}Events
Replay an event to a target (records a delivery attempt)
POST
/
v1
/
events
/
{eventId}
/
replay
Replay an event to a target (records a delivery attempt)
curl --request POST \
--url https://api.webhook.co/v1/events/{eventId}/replay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"kind": "localhost-tunnel",
"sessionId": "<string>"
},
"idempotencyKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target: {kind: 'localhost-tunnel', sessionId: '<string>'},
idempotencyKey: '<string>'
})
};
fetch('https://api.webhook.co/v1/events/{eventId}/replay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webhook.co/v1/events/{eventId}/replay"
payload = {
"target": {
"kind": "localhost-tunnel",
"sessionId": "<string>"
},
"idempotencyKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.webhook.co/v1/events/{eventId}/replay"
payload := strings.NewReader("{\n \"target\": {\n \"kind\": \"localhost-tunnel\",\n \"sessionId\": \"<string>\"\n },\n \"idempotencyKey\": \"<string>\"\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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": "<string>",
"idempotencyKey": "<string>",
"status": "queued",
"statusCode": 0,
"attempt": 123,
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}"<string>"{
"error": "<string>",
"message": "<string>"
}Authorizations
A whk_-prefixed API key (opaque; not a JWT).
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
application/json
Response
Success.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Available options:
queued, forwarded, pending, delivered, failed, blocked, dead, cancelled Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
x <= 9007199254740991Was this page helpful?