Skip to main content
GET
/
api
/
v1
/
enterprise
/
eudr
/
webhooks
/
dlq
Python
import agribackup
from agribackup.rest import ApiException

# Initialize Client
configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
configuration.api_key['ApiKeyAuth'] = 'sk_live_YOUR_API_KEY'

with agribackup.ApiClient(configuration) as api_client:
    try:
        api_instance = agribackup.EnterpriseWebhooksApi(api_client)
        response = api_instance.get_dlq_messages()
        print(response)
    except ApiException as e:
        print("Exception when calling API: %s\n" % e)
import { AgriBackupClient } from '@agribackup/sdk';

// Initialize Client
const client = new AgriBackupClient({
apiKey: 'sk_live_YOUR_API_KEY',
baseUrl: 'https://live.agribackup.com/api/v1'
});

async function execute() {
try {
const response = await client.webhooks.getDlqMessages();
console.log(response);
} catch (error) {
console.error(error);
}
}
import com.agribackup.client.*;
import com.agribackup.client.api.*;
import com.agribackup.client.model.*;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://live.agribackup.com/api/v1");
defaultClient.setApiKey("sk_live_YOUR_API_KEY");

EnterpriseWebhooksApi apiInstance = new EnterpriseWebhooksApi(defaultClient);
try {
Object result = apiInstance.getDlqMessages();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling API: " + e.getResponseBody());
}
}
}
using System;
using System.Threading.Tasks;
using AgriBackup.SDK.Api;
using AgriBackup.SDK.Client;
using AgriBackup.SDK.Model;

class Program {
static async Task Main() {
Configuration config = new Configuration();
config.BasePath = "https://live.agribackup.com/api/v1";
config.AddApiKey("ApiKeyAuth", "sk_live_YOUR_API_KEY");

var apiInstance = new EnterpriseWebhooksApi(config);
try {
var result = await apiInstance.GetDlqMessagesAsync();
Console.WriteLine(result);
} catch (ApiException e) {
Console.WriteLine("Exception when calling API: " + e.Message);
}
}
}
curl --request GET \
--url https://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq \
--header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq', 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://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$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://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "retrievedCount": 10,
  "messages": [
    {
      "eventId": "evt_12345",
      "eventType": "shipment.linked",
      "payload": "<string>",
      "timestamp": "<string>",
      "attempts": 5
    }
  ]
}
Returns compliance event payloads that could not be delivered to your registered webhook endpoint after exhausting all automatic retry attempts. Each message in the Dead-Letter Queue (DLQ) includes the original event ID, event type, raw payload, original timestamp, and the number of delivery attempts that failed. Use this endpoint to audit delivery failures, investigate endpoint availability issues, and decide whether to replay or acknowledge-and-delete individual messages. To reprocess messages, see Replay a DLQ Message.

DLQ Message Fields

FieldTypeDescription
eventIdstringUnique identifier of the original compliance event
eventTypestringThe event type that failed delivery (e.g. shipment.linked)
payloadstringRaw JSON payload string that failed to deliver
timestampstringISO-8601 timestamp when the event was originally generated
attemptsintegerNumber of delivery attempts made before the message was moved to the DLQ
The response also includes retrievedCount (total messages returned in this response) and a messages array of WebhookDlqMessage objects.
import requests

headers = {"X-API-Key": "sk_live_YOUR_API_KEY"}
response = requests.get(
    "https://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq",
    headers=headers,
)
data = response.json()
print(f"Retrieved {data['retrievedCount']} failed messages")
for msg in data["messages"]:
    print(msg["eventId"], msg["eventType"], msg["attempts"])
const response = await fetch(
  "https://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq",
  {
    headers: { "X-API-Key": "sk_live_YOUR_API_KEY" },
  }
);
const data = await response.json();
console.log(`Retrieved ${data.retrievedCount} failed messages`);
data.messages.forEach((msg) => {
  console.log(msg.eventId, msg.eventType, msg.attempts);
});
curl -X GET \
  "https://live.agribackup.com/api/v1/enterprise/eudr/webhooks/dlq" \
  -H "X-API-Key: sk_live_YOUR_API_KEY"

Authorizations

X-API-Key
string
header
required

Enterprise API Key provided via the AgriBackup developer console.

Query Parameters

limit
integer<int32>
default:10
startingAfter
string

Response

200 - */*

OK

Response containing permanently failed webhook payloads

retrievedCount
integer<int32>
required

Number of messages retrieved from the DLQ

Example:

10

messages
object[]
required

The list of failed messages