> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Webhook requests

> Lists webhook requests Metriport sent to your app, sorted by most recent as default.

Returns webhook deliveries Metriport sent to your configured URL. Sorted by most recent
as default (`createdAt=desc`). Default page size is 50; maximum is 500.

Rows are retained for 30 days.

This is a paginated endpoint. For more information see [pagination](/medical-api/handling-data/pagination).

## Query Params

<ParamField query="fromItem" type="string" optional>
  Pagination cursor to start after a previous page. Use the `fromItem` value from
  `meta.nextPage`.
</ParamField>

<ParamField query="count" type="number" optional>
  Number of items per page. Default 50, maximum 500.
</ParamField>

<ParamField query="sort" type="string" optional>
  Sort, for example `createdAt=desc`. Allowed columns: `createdAt`, `id`. When
  omitted, results are sorted by most recent (`createdAt=desc`).
</ParamField>

## Response

<ResponseField name="meta" type="object" required>
  Pagination metadata. See
  [pagination](/medical-api/handling-data/pagination).
</ResponseField>

<ResponseField name="requests" type="WebhookRequest[]" required>
  Webhook requests Metriport sent to your URL.

  <Expandable title="Webhook request properties">
    <ResponseField name="id" type="string" required>
      The webhook request ID. Also used as `meta.messageId` on the payload we send.
    </ResponseField>

    <ResponseField name="type" type="string" required>
      Webhook type, for example `medical.document-download` or `patient.discharge`.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      One of `processing`, `success`, or `failure`.
    </ResponseField>

    <ResponseField name="statusDetail" type="string">
      Extra status text, when present. `OK` on success, or the reason the
      request failed.
    </ResponseField>

    <ResponseField name="payload" type="object" required>
      The JSON stored for this send.
    </ResponseField>

    <ResponseField name="createdAt" type="string" required>
      When the webhook request was created, ISO 8601.
    </ResponseField>

    <ResponseField name="requestId" type="string">
      Related request ID when this webhook was tied to another flow.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```javascript Metriport SDK theme={null}
  import { MetriportMedicalApi } from "@metriport/api-sdk";

  const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

  const response = await metriportClient.listWebhookRequests();
  ```
</ResponseExample>

Example response:

```json theme={null}
{
  "meta": {
    "nextPage": "https://api.metriport.com/settings/webhook/request?fromItem=<cursor>&count=50",
    "itemsOnPage": 1,
    "itemsInTotal": 1
  },
  "requests": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "type": "medical.document-download",
      "status": "success",
      "payload": {
        "patients": [
          {
            "patientId": "eddeefa1-b54a-41d6-854f-0e91b7871d6a",
            "type": "document-download",
            "status": "completed"
          }
        ]
      },
      "createdAt": "2026-09-21T19:00:00.000Z",
      "requestId": "11111111-1111-1111-1111-111111111111"
    }
  ]
}
```
