# Deliveries ## List webhook deliveries `client.webhooks.deliveries.list(stringwebhookID, DeliveryListParamsparams?, RequestOptionsoptions?): DeliveryListResponse` **get** `/v2/webhooks/{teamId}/{webhookId}/deliveries` An endpoint's deliveries, newest first, with optional status / type / time-range filters and cursor pagination. ### Parameters - `webhookID: string` - `params: DeliveryListParams` - `teamId?: string` Path param - `after?: string` Query param: Only deliveries at or after this ISO-8601 timestamp. - `before?: string` Query param: Only deliveries at or before this ISO-8601 timestamp. - `cursor?: string` Query param: Opaque cursor from a previous response's `next_cursor`. - `limit?: number` Query param: Page size (1–100, default 25). - `status?: "success" | "failed"` Query param: Filter by outcome. - `"success"` - `"failed"` - `type?: "delivery" | "verification" | "all"` Query param: Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to include verification handshakes. - `"delivery"` - `"verification"` - `"all"` ### Returns - `DeliveryListResponse` - `data: Array` - `created_at: string` - `delivery_id: string` - `status: "success" | "failed"` - `"success"` - `"failed"` - `type: "delivery" | "verification"` - `"delivery"` - `"verification"` - `webhook_id: string` - `attempts?: number | null` Number of attempts made so far (including async retries). - `event?: string | null` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `status_code?: number | null` HTTP status of the latest attempt; null on a transport error. - `team_id?: string | null` - `updated_at?: string | null` - `url?: string` - `next_cursor?: string | null` Pass as `cursor` to fetch the next page; null when there are no more. ### Example ```typescript import Micro from '@micro-so/sdk'; const client = new Micro({ teamID: 'My Team ID', apiKey: process.env['MICRO_API_KEY'], // This is the default and can be omitted }); const deliveries = await client.webhooks.deliveries.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); console.log(deliveries.data); ``` #### Response ```json { "data": [ { "created_at": "2019-12-27T18:11:19.117Z", "delivery_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "success", "type": "delivery", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "attempts": 0, "event": "event", "status_code": 0, "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "url": "url" } ], "next_cursor": "next_cursor" } ``` ## Get a delivery `client.webhooks.deliveries.get(stringdeliveryID, DeliveryGetParamsparams, RequestOptionsoptions?): WebhookDeliveryDetail` **get** `/v2/webhooks/{teamId}/{webhookId}/deliveries/{deliveryId}` A single delivery plus its full attempt timeline (including async retries). ### Parameters - `deliveryID: string` - `params: DeliveryGetParams` - `teamId?: string` - `webhookId: string` ### Returns - `WebhookDeliveryDetail extends WebhookDelivery` A delivery plus its full attempt timeline. - `attempt_history?: Array` - `attempt: number` 1-based attempt number. - `created_at: string` - `status: "success" | "failed"` - `"success"` - `"failed"` - `error?: string | null` Failure reason, when status is failed. - `request_body?: string | null` Body sent to the endpoint (delivery only); may be truncated. - `response_body?: string | null` Body returned by the endpoint; may be truncated. - `status_code?: number | null` ### Example ```typescript import Micro from '@micro-so/sdk'; const client = new Micro({ teamID: 'My Team ID', apiKey: process.env['MICRO_API_KEY'], // This is the default and can be omitted }); const webhookDeliveryDetail = await client.webhooks.deliveries.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { webhookId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(webhookDeliveryDetail); ``` #### Response ```json { "created_at": "2019-12-27T18:11:19.117Z", "delivery_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "status": "success", "type": "delivery", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "attempts": 0, "event": "event", "status_code": 0, "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "url": "url", "attempt_history": [ { "attempt": 0, "created_at": "2019-12-27T18:11:19.117Z", "status": "success", "error": "error", "request_body": "request_body", "response_body": "response_body", "status_code": 0 } ] } ``` ## Domain Types ### Delivery List Response - `DeliveryListResponse` - `data: Array` - `created_at: string` - `delivery_id: string` - `status: "success" | "failed"` - `"success"` - `"failed"` - `type: "delivery" | "verification"` - `"delivery"` - `"verification"` - `webhook_id: string` - `attempts?: number | null` Number of attempts made so far (including async retries). - `event?: string | null` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `status_code?: number | null` HTTP status of the latest attempt; null on a transport error. - `team_id?: string | null` - `updated_at?: string | null` - `url?: string` - `next_cursor?: string | null` Pass as `cursor` to fetch the next page; null when there are no more.