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

# Get Webhooks

> Retrieve all registered webhooks for your account

## Authentication

<ResponseField name="Authorization" type="string" required>
  Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://api.hirempire.com/v1/webhooks' \
  --header 'Authorization: Bearer YOUR_TOKEN'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.hirempire.com/v1/webhooks', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

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

  url = "https://api.hirempire.com/v1/webhooks"
  headers = {
      "Authorization": "Bearer YOUR_TOKEN"
  }

  response = requests.get(url, headers=headers)
  data = response.json()
  print(data)
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.hirempire.com/v1/webhooks',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
      'Authorization: Bearer YOUR_TOKEN'
    ),
  ));

  $response = curl_exec($curl);
  curl_close($curl);

  $data = json_decode($response, true);
  print_r($data);
  ?>
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="array">
  Array of webhook objects

  <Expandable title="Webhook Object Properties">
    <ResponseField name="id" type="string">
      Unique identifier for the webhook
    </ResponseField>

    <ResponseField name="request_url" type="string">
      The URL where webhook events are sent
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp when the webhook was created
    </ResponseField>

    <ResponseField name="active" type="boolean">
      Whether the webhook is currently active
    </ResponseField>

    <ResponseField name="events" type="string[]">
      Array of subscribed event types
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "0c8t5e54-e053-40b2-8c9c-b45rgy0acf8a",
        "request_url": "https://example.com/webhook",
        "created_at": "2025-07-01T04:27:13.000Z",
        "active": true,
        "events": [
          "job_added",
          "job_activated",
          "meeting_booked"
        ]
      }
    ]
  }
  ```
</ResponseExample>

If no webhooks are registered, the `data` array will be empty:

```json theme={null}
{
  "success": true,
  "data": []
}
```

## Error Responses

### Validation Errors

**400 - Bad Request**

```json theme={null}
{
  "success": false,
  "error": "Invalid token"
}
```

**400 - Bad Request**

```json theme={null}
{
  "success": false,
  "error": "Input is incorrect."
}
```

### Authorization Errors

**401 - Unauthorized**

```json theme={null}
{
  "success": false,
  "error": "Token is expired"
}
```
