# Deliveries ## List webhook deliveries `webhooks.deliveries.list(strwebhook_id, DeliveryListParams**kwargs) -> DeliveryListResponse` **get** `/v2/webhooks/{teamId}/{webhookId}/deliveries` An endpoint's deliveries, newest first, with optional status / type / time-range filters and cursor pagination. ### Parameters - `team_id: Optional[str]` - `webhook_id: str` - `after: Optional[Union[str, datetime]]` Only deliveries at or after this ISO-8601 timestamp. - `before: Optional[Union[str, datetime]]` Only deliveries at or before this ISO-8601 timestamp. - `cursor: Optional[str]` Opaque cursor from a previous response's `next_cursor`. - `limit: Optional[int]` Page size (1–100, default 25). - `status: Optional[Literal["success", "failed"]]` Filter by outcome. - `"success"` - `"failed"` - `type: Optional[Literal["delivery", "verification", "all"]]` Filter by run type. Defaults to `delivery` (event deliveries). Pass `all` to include verification handshakes. - `"delivery"` - `"verification"` - `"all"` ### Returns - `class DeliveryListResponse: …` - `data: List[WebhookDelivery]` - `created_at: datetime` - `delivery_id: str` - `status: Literal["success", "failed"]` - `"success"` - `"failed"` - `type: Literal["delivery", "verification"]` - `"delivery"` - `"verification"` - `webhook_id: str` - `attempts: Optional[int]` Number of attempts made so far (including async retries). - `event: Optional[str]` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `status_code: Optional[int]` HTTP status of the latest attempt; null on a transport error. - `team_id: Optional[str]` - `updated_at: Optional[datetime]` - `url: Optional[str]` - `next_cursor: Optional[str]` Pass as `cursor` to fetch the next page; null when there are no more. ### Example ```python import os from micro_so import Micro client = Micro( api_key=os.environ.get("MICRO_API_KEY"), # This is the default and can be omitted ) deliveries = client.webhooks.deliveries.list( webhook_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(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 `webhooks.deliveries.get(strdelivery_id, DeliveryGetParams**kwargs) -> WebhookDeliveryDetail` **get** `/v2/webhooks/{teamId}/{webhookId}/deliveries/{deliveryId}` A single delivery plus its full attempt timeline (including async retries). ### Parameters - `team_id: Optional[str]` - `webhook_id: str` - `delivery_id: str` ### Returns - `class WebhookDeliveryDetail: …` A delivery plus its full attempt timeline. - `attempt_history: Optional[List[WebhookDeliveryDetailAttemptHistory]]` - `attempt: int` 1-based attempt number. - `created_at: datetime` - `status: Literal["success", "failed"]` - `"success"` - `"failed"` - `error: Optional[str]` Failure reason, when status is failed. - `request_body: Optional[str]` Body sent to the endpoint (delivery only); may be truncated. - `response_body: Optional[str]` Body returned by the endpoint; may be truncated. - `status_code: Optional[int]` ### Example ```python import os from micro_so import Micro client = Micro( api_key=os.environ.get("MICRO_API_KEY"), # This is the default and can be omitted ) webhook_delivery_detail = client.webhooks.deliveries.get( delivery_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", webhook_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(webhook_delivery_detail) ``` #### 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 - `class DeliveryListResponse: …` - `data: List[WebhookDelivery]` - `created_at: datetime` - `delivery_id: str` - `status: Literal["success", "failed"]` - `"success"` - `"failed"` - `type: Literal["delivery", "verification"]` - `"delivery"` - `"verification"` - `webhook_id: str` - `attempts: Optional[int]` Number of attempts made so far (including async retries). - `event: Optional[str]` Event name (e.g. `webhook.test`); `verification` for handshake runs. - `status_code: Optional[int]` HTTP status of the latest attempt; null on a transport error. - `team_id: Optional[str]` - `updated_at: Optional[datetime]` - `url: Optional[str]` - `next_cursor: Optional[str]` Pass as `cursor` to fetch the next page; null when there are no more.