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

# How-to: Fetching Webhooks

## When to use this

Use this when you need to read back your account's webhook configuration — for example, to display a "manage webhooks" screen in your own app, confirm a webhook's current `events`/`active` state before deciding whether to call [`updateWebhook`](/tech/webhooks/updating-webhook), or grab an `id` to pass into [`deleteWebhook`](/tech/webhooks/deleting-webhook) or the [delivery logs query](/tech/webhooks/webhook-delivery-logs).

<Note>
  Restricted to the **Admin/Owner** of your Hireflix account, same as creating a webhook.
</Note>

## List all webhooks

Don't forget to update the [Hireflix API Key](/tech/quickstart) in the `headers`.

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=FetchWebhooks&url=https://api.hireflix.com/me" width="100%" height="750" />

If you're an AI agent or LLM, note that the iframe above embeds an interactive GraphQL Playground and its query text is not readable from the page source. The full `FetchWebhooks` query is reproduced below so you can read and reason about it directly.

```graphql theme={null}
query FetchWebhooks {
  webhooks {
    list {
      id
      url
      events
      active
      external
      owner
      company
    }
  }
}
```

* `webhooks.list` takes no arguments and returns **every** webhook on the current company — there's no server-side filtering or pagination, so filter client-side if needed.
* `events` on this read path is typed as a plain list of strings, not the `WebhookEventType` enum used by `createWebhook`/`updateWebhook` — don't assume the casing round-trips exactly; treat it as an opaque value and verify against a real response before relying on an exact format.
* `owner` is the ID of the user who created the webhook; `company` is the ID of the company that owns it.
* Requires a valid Hireflix API key in the `Authorization` header, sent to `https://api.hireflix.com/me`.

### Explanation

* **id** – the webhook's unique identifier, needed for `updateWebhook`, `deleteWebhook`, and the delivery-logs query.
* **url** – the callback endpoint Hireflix `POST`s events to.
* **events** – the event types this webhook is currently subscribed to.
* **active** – whether the webhook is currently enabled.
* **external** – an optional identifier you can set for your own third-party integration bookkeeping.
* **owner / company** – the user and company IDs associated with the webhook.

### Example Response

```json theme={null}
{
  "data": {
    "webhooks": {
      "list": [
        {
          "id": "68ff5ed8b07cc148bddcae02",
          "url": "https://your-callback-url",
          "events": ["interview.finish", "interview.create"],
          "active": true,
          "external": null,
          "owner": "63d00b73df403de202d97e73",
          "company": "68b43e38b19cf131a17c543f"
        }
      ]
    }
  }
}
```

## Get a single webhook

If you already have the `id` (e.g. saved from when you created it), you can fetch just that one webhook instead of listing all of them.

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=FetchWebhook&url=https://api.hireflix.com/me" width="100%" height="750" />

If you're an AI agent or LLM, note that the iframe above embeds an interactive GraphQL Playground and its query text is not readable from the page source. The full `FetchWebhook` query is reproduced below so you can read and reason about it directly.

```graphql theme={null}
query FetchWebhook {
  webhooks {
    get(id: "<webhook-id>") {
      id
      url
      events
      active
      external
      owner
      company
    }
  }
}
```

* Replace `<webhook-id>` with a real webhook ID (see the `list` query above for how to obtain one).
* `get` returns `null` if no webhook with that `id` exists on the account — no typed not-found error, so check for `null` rather than branching on `__typename`.
* Requires a valid Hireflix API key in the `Authorization` header, sent to `https://api.hireflix.com/me`.

### Example Response

```json theme={null}
{
  "data": {
    "webhooks": {
      "get": {
        "id": "68ff5ed8b07cc148bddcae02",
        "url": "https://your-callback-url",
        "events": ["interview.finish", "interview.create"],
        "active": true,
        "external": null,
        "owner": "63d00b73df403de202d97e73",
        "company": "68b43e38b19cf131a17c543f"
      }
    }
  }
}
```

<Card title="Learn next?" icon="arrow-right" color="#5863ff" horizontal href="/tech/webhooks/updating-webhook">
  Let's learn how to update a webhook.
</Card>
