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

# Fetch webhook subscriptions

> List every webhook registered for your Dojah app — callback URL, service, environment, and last delivery status.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-get`}>GET</span>
  <code>/api/v1/webhook/fetch</code>
</div>

List every webhook currently registered for your app — each with its callback URL, the service it listens to, the environment, and the last delivery status.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |

## Parameters

None. The subscriptions returned are those of the app and environment tied to the key you call with — call with your sandbox key for sandbox subscriptions, your live key for live ones.

## Response

Returns `entity` as an array of subscription objects. Each carries:

| Field                           | Description                                                                                    |
| ------------------------------- | ---------------------------------------------------------------------------------------------- |
| `app_id`                        | The app the subscription belongs to.                                                           |
| `endpoint`                      | The callback URL receiving events.                                                             |
| `environment`                   | `live` or `sandbox`.                                                                           |
| `service`                       | The subscribed service — e.g. `sms`, `kyc_widget`.                                             |
| `confirmation_status`           | Status of the most recent delivery (e.g. `DELIVERED`), or `null` if nothing has been sent yet. |
| `date_created` / `date_updated` | When the subscription was created and last changed.                                            |

## Errors

| Code  | Meaning                                                                |
| ----- | ---------------------------------------------------------------------- |
| `401` | Unauthorized — check your secret key and `AppId` (no `Bearer` prefix). |
| `429` | Too many requests — back off and retry.                                |

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.dojah.io/api/v1/webhook/fetch" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}"
  ```

  ```js Node.js theme={null}
  const res = await fetch("https://api.dojah.io/api/v1/webhook/fetch", {
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
    },
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      "https://api.dojah.io/api/v1/webhook/fetch",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
  )
  data = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json GET /api/v1/webhook/fetch theme={null}
  {
    "entity": [
      {
        "app_id": "61e6bef823664a003647505f",
        "endpoint": "https://yourapp.com/webhooks/dojah",
        "environment": "live",
        "service": "sms",
        "confirmation_status": "DELIVERED",
        "date_created": "2022-01-18T14:31:36.810231+01:00",
        "date_updated": "2022-01-18T14:31:36.810319+01:00"
      }
    ]
  }
  ```
</ResponseExample>
