Skip to content

List Deliveries

GET /v1/webhooks/deliveries

List recent webhook delivery attempts for the authenticated user. Returns delivery logs ordered by most recent first, so you can monitor whether your webhooks are receiving events successfully.

Try it

Test this endpoint interactively in the Swagger UI.

Authorization required

Include your API key in the Authorization header.

Request

Headers

HeaderValueRequired
AuthorizationBearer <token>Yes

Query Parameters

ParameterTypeDefaultDescription
webhookIdstringFilter deliveries by a specific webhook ID.
limitnumber50Maximum number of results to return (1–100).

Code Examples

bash
curl "https://api.docmap.io/v1/webhooks/deliveries?limit=10" \
  -H "Authorization: Bearer dm_live_abc123def456ghi789jkl012mno345"
typescript
const apiKey = process.env.DOCMAP_API_KEY

const response = await fetch(
  'https://api.docmap.io/v1/webhooks/deliveries?limit=10',
  { headers: { 'Authorization': `Bearer ${apiKey}` } },
)

const { data } = await response.json()

for (const delivery of data) {
  console.log(`${delivery.event} → ${delivery.url} — ${delivery.status} (${delivery.durationMs}ms)`)
}
python
import requests

api_key = "dm_live_abc123def456ghi789jkl012mno345"

response = requests.get(
    "https://api.docmap.io/v1/webhooks/deliveries",
    headers={"Authorization": f"Bearer {api_key}"},
    params={"limit": 10},
)

deliveries = response.json()["data"]

for d in deliveries:
    print(f"{d['event']}{d['url']}{d['status']} ({d['durationMs']}ms)")

Response

Status: 200 OK

The response body contains a data array of delivery log objects.

Fields

Each object in the array contains:

FieldTypeDescription
idstringUnique identifier for the delivery record.
userIdstringID of the user who owns the webhook.
webhookIdstringID of the webhook that was targeted.
extractionIdstringID of the extraction that triggered this delivery.
eventstringEvent name: extraction.completed or extraction.failed.
urlstringThe webhook URL at the time of delivery.
statusstringsuccess if the endpoint returned a 2xx status, failed otherwise.
httpStatusnumber | nullHTTP response status code. null if the request failed before receiving a response (e.g. network error, timeout).
errorstring | nullError message if the delivery failed. null on success.
durationMsnumberRound-trip time of the delivery attempt in milliseconds.
createdAtstringISO 8601 timestamp of when the delivery was attempted.

Example

json
{
  "data": [
    {
      "id": "abc123def456",
      "userId": "uid_a1b2c3d4e5f6",
      "webhookId": "webhook-abc123def456",
      "extractionId": "extract-xyz789",
      "event": "extraction.completed",
      "url": "https://your-app.com/webhooks/docmap",
      "status": "success",
      "httpStatus": 200,
      "error": null,
      "durationMs": 342,
      "createdAt": "2025-01-20T14:30:04.000Z"
    },
    {
      "id": "def456ghi789",
      "userId": "uid_a1b2c3d4e5f6",
      "webhookId": "webhook-abc123def456",
      "extractionId": "extract-uvw456",
      "event": "extraction.failed",
      "url": "https://your-app.com/webhooks/docmap",
      "status": "failed",
      "httpStatus": null,
      "error": "The operation was aborted due to timeout",
      "durationMs": 10003,
      "createdAt": "2025-01-20T12:15:00.000Z"
    }
  ]
}

Errors

StatusCodeDescription
401UNAUTHORIZEDMissing, invalid, or expired API key / token.

DocMap API Documentation