# List webhooks

The webhook of the account, if it has one. The signing secret is not included.

`GET https://api.switchfile.io/v2/users/me/webhooks`

Needs an API key: `Authorization: Bearer YOUR_API_KEY`. See [Authentication](https://switchfile.io/docs/authentication).

## Example

cURL:

```bash
curl "https://api.switchfile.io/v2/users/me/webhooks" \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY"
```

Node.js:

```js
const res = await fetch("https://api.switchfile.io/v2/users/me/webhooks", {
  headers: {
    Authorization: `Bearer ${process.env.SWITCHFILE_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());
```

PHP:

```php
<?php
$ch = curl_init('https://api.switchfile.io/v2/users/me/webhooks');
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('SWITCHFILE_API_KEY'),
    ],
    CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

if ($status >= 400) {
    throw new RuntimeException("HTTP $status: $response");
}
print_r(json_decode($response, true));
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.switchfile.io/v2/users/me/webhooks",
    headers={"Authorization": f"Bearer {os.environ['SWITCHFILE_API_KEY']}"},
)
res.raise_for_status()
print(res.json())
```

## Parameters

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `filter[url]` | string | no | Only webhooks with exactly this URL |
| `page` | number | no | Page number, starting at 1 (at least 1) |
| `per_page` | number | no | Entries per page, 100 by default (1 to 1000) |

## Responses

### 200: OK

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Webhook[] | yes |  |
| `data[].created_at` | string | yes | ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00 |
| `data[].disabled` | boolean | yes | Always false: switchfile does not disable webhooks on its own |
| `data[].events` | string[] | yes |  |
| `data[].failing` | boolean | yes | The last delivery to this URL failed |
| `data[].id` | string | yes | ID of the webhook (a UUID; CloudConvert uses an integer) |
| `data[].last_error_at` | string \| null | yes | ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00 |
| `data[].last_response_code` | string \| null | yes | HTTP status of the last failed delivery, or NETWORK_ERROR |
| `data[].links` | object | yes |  |
| `data[].links.self` | string | yes |  |
| `data[].updated_at` | string | yes | ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00 |
| `data[].url` | string | yes |  |
| `links` | PageLinks | yes |  |
| `links.first` | string | yes |  |
| `links.last` | string \| null | yes |  |
| `links.next` | string \| null | yes |  |
| `links.prev` | string \| null | yes |  |
| `meta` | PageMeta | yes |  |
| `meta.current_page` | string (integer) \| integer | yes |  |
| `meta.current_page_url` | string | yes |  |
| `meta.from` | string (integer) \| integer | yes |  |
| `meta.path` | string | yes |  |
| `meta.per_page` | string (integer) \| integer | yes |  |
| `meta.to` | string (integer) \| integer | yes |  |

Example (application/json):

```json
{
  "data": [
    {
      "id": "1a7e3c5b-9d2f-4b6a-8e0c-5f3d1b7a9c24",
      "url": "https://example.com/hooks/switchfile",
      "disabled": false,
      "events": [
        "job.finished",
        "job.failed"
      ],
      "failing": false,
      "last_error_at": null,
      "last_response_code": null,
      "created_at": "2026-11-06T18:00:00+00:00",
      "updated_at": "2026-11-06T18:00:00+00:00",
      "links": {
        "self": "https://api.switchfile.io/v2/webhooks/1a7e3c5b-9d2f-4b6a-8e0c-5f3d1b7a9c24"
      }
    }
  ],
  "links": {
    "first": "https://api.switchfile.io/v2/users/me/webhooks?page=1",
    "last": null,
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "current_page_url": "https://api.switchfile.io/v2/users/me/webhooks?page=1",
    "from": 1,
    "path": "https://api.switchfile.io/v2/users/me/webhooks",
    "per_page": 100,
    "to": 1
  }
}
```

### 401: The API key is missing or not valid (`UNAUTHENTICATED`)

Example (application/json):

```json
{
  "message": "Missing or invalid API key.",
  "code": "UNAUTHENTICATED"
}
```

### 404: Does not exist for this account (`NOT_FOUND`)

Example (application/json):

```json
{
  "message": "Job not found.",
  "code": "NOT_FOUND"
}
```

### 422: Invalid data. errors names the fields (`INVALID_DATA`)

Example (application/json):

```json
{
  "message": "id: Expected string to match 'uuid' format",
  "code": "INVALID_DATA",
  "errors": {
    "id": [
      "Expected string to match 'uuid' format"
    ]
  }
}
```

### 429: Too many requests or a daily quota is used up. See Retry-After (`RATE_LIMIT_EXCEEDED`)

Example (application/json):

```json
{
  "message": "Too many requests. Try again in 12 seconds.",
  "code": "RATE_LIMIT_EXCEEDED"
}
```

Error bodies and codes are explained in [Errors](https://switchfile.io/docs/errors).
