List deliveries
curl --request GET \
--url https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "cly7w4c5d0002x8b3n1q3r0aa",
"webhook_id": "<string>",
"event": "post.failed",
"status": "pending",
"attempts": 1,
"created_at": "2023-11-07T05:31:56Z",
"next_attempt_at": "2023-11-07T05:31:56Z",
"response_status": 200,
"response_body": "<string>",
"error": "The endpoint returned 500.",
"delivered_at": "2023-11-07T05:31:56Z",
"data": {}
}
],
"meta": {
"pagination": {
"limit": 25,
"offset": 0,
"total": 132,
"has_more": true
}
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required."
}
}{
"error": {
"code": "not_found",
"message": "Post could not be found."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the window resets."
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required.",
"details": [
{
"message": "Instagram requires at least 1 media item — text-only posts are not supported.",
"field": "profile_ids",
"network": "instagram",
"code": "invalid_request"
}
]
}
}Webhooks
List deliveries
The delivery log for one endpoint, with payloads and responses.
GET
https://api.nylon.dev
/
v1
/
webhooks
/
{webhookId}
/
deliveries
List deliveries
curl --request GET \
--url https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.nylon.dev/v1/webhooks/{webhookId}/deliveries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "cly7w4c5d0002x8b3n1q3r0aa",
"webhook_id": "<string>",
"event": "post.failed",
"status": "pending",
"attempts": 1,
"created_at": "2023-11-07T05:31:56Z",
"next_attempt_at": "2023-11-07T05:31:56Z",
"response_status": 200,
"response_body": "<string>",
"error": "The endpoint returned 500.",
"delivered_at": "2023-11-07T05:31:56Z",
"data": {}
}
],
"meta": {
"pagination": {
"limit": 25,
"offset": 0,
"total": 132,
"has_more": true
}
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required."
}
}{
"error": {
"code": "not_found",
"message": "Post could not be found."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the window resets."
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required.",
"details": [
{
"message": "Instagram requires at least 1 media item — text-only posts are not supported.",
"field": "profile_ids",
"network": "instagram",
"code": "invalid_request"
}
]
}
}Authorizations
An API key beginning with nylon_live_.
Path Parameters
The Nylon id of the webhook endpoint.
Example:
"cly7w1a2b0001x8b3k9m2p0zz"
Query Parameters
Page size, 1–100.
Required range:
1 <= x <= 100Rows to skip.
Required range:
x >= 0Comma-separated delivery statuses to include.
Example:
"pending,failed"
Comma-separated event types to include.
Example:
"post.failed"
Response
The delivery log.
Hide child attributes
Hide child attributes
Also the id in the payload and the Nylon-Delivery header — deduplicate on it.
Example:
"cly7w4c5d0002x8b3n1q3r0aa"
Example:
"post.failed"
pending means a further attempt is due; failed means the attempts are exhausted.
Available options:
pending, delivered, failed Example:
1
When the next attempt is due. Null once the delivery is settled.
Example:
200
The first 2000 characters of what your endpoint returned.
Example:
"The endpoint returned 500."
The event payload, exactly as it was sent under data.
⌘I