List webhook delivery attempts
curl --request GET \
--url https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attemptsimport requests
url = "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts', 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.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"attempt": 2,
"trigger": "initial",
"url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"http_status": 123,
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"has_more": true,
"next_cursor": "<string>",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}Webhook Deliveries
List Webhook Delivery Attempts
List delivery attempts, newest first.
GET
/
webhooks
/
deliveries
/
{delivery_id}
/
attempts
List webhook delivery attempts
curl --request GET \
--url https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attemptsimport requests
url = "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts', 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.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/webhooks/deliveries/{delivery_id}/attempts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"attempt": 2,
"trigger": "initial",
"url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"http_status": 123,
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"has_more": true,
"next_cursor": "<string>",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}0 Credits
Use the attempt history to investigate delivery failures. After fixing your receiving endpoint, retry the delivery to send the retained event again.
Path Parameters
Delivery ID.
Pattern:
^whd_[a-f0-9]{32}$Query Parameters
Number of attempts to return.
Required range:
1 <= x <= 100The next_cursor from the previous response.
Pattern:
^wha_[a-f0-9]{32}$Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 characters. Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
Maximum array length:
20Required string length:
1 - 50Example:
["production", "team-alpha"]
Response
A page of delivery attempts
Delivery attempts.
Show child attributes
Show child attributes
Whether more attempts are available.
Next page cursor, or null on the last page.
Unique id of this API call, also sent in the X-Request-Id response header. Quote it when contacting support about a failed request.
Example:
"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"
Credit usage, included whenever a valid API key is provided.
Show child attributes
Show child attributes
Was this page helpful?