---
title: "Process due pending webhook deliveries"
method: POST
path: "/v1/webhooks/deliveries/drain"
---

# Process due pending webhook deliveries

`POST /v1/webhooks/deliveries/drain`

## Request

- Base URL: `https://api.uploadcheck.app`
- URL: `https://api.uploadcheck.app/v1/webhooks/deliveries/drain`
- Auth: HTTP bearer

Processes due deliveries. Stored workspace API keys drain only pending deliveries owned by their own workspace; operator/admin bearer keys can drain globally.

## Request body

- object
  - `limit` integer

## Response `200`

Due delivery drain result

- WebhookDrainResult
  - `processed` integer, required
  - `results` WebhookDelivery[], required
    - `deliveryId` string
    - `webhookId` string
    - `eventType` string
    - `jobId` string
    - `workspaceId` string, nullable: Workspace that owns this delivery. Stored workspace API keys can only list, retry, or drain their own deliveries.
    - `ownerEmail` string, nullable
    - `apiKeyId` string, nullable
    - `status` 'pending' | 'sent' | 'failed'
    - `url` string
    - `attemptCount` integer
    - `nextAttemptAt` string, date-time, nullable
    - `lastAttemptAt` string, date-time, nullable
    - `responseStatus` integer, nullable
    - `lastError` string, nullable
    - `sentAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `signatureHeader` 'X-UploadCheck-Signature'
    - `signature` string
    - `payload` object

---

[API](https://skmtc.dev/uploadcheck/apis/uploadcheck-app-api.md) · [All operations](https://skmtc.dev/uploadcheck/apis/uploadcheck-app-api/llms.txt) · [OpenAPI document](https://skmtc.dev/uploadcheck/apis/uploadcheck-app-api/revisions/d7c8a14caa30?raw)
