---
title: "List alert sources"
method: GET
path: "/alert-sources"
tags: ["Alert sources"]
---

# List alert sources

`GET /alert-sources`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/alert-sources`
- Auth: HTTP bearer

Returns the team's alert sources, by name.

## Query parameters

- `filter[type]` 'webhook' | 'email' | 'alertmanager' | 'grafana' | 'sentry': The external tool behind an alert source; decides how its requests are read. | | |---| | `webhook` <br/> Spectate's own JSON format, for scripts, CI and anything that can call a URL. | | `email` <br/> Emails to the source's own address (subject becomes the alert). | | `alertmanager` <br/> Prometheus Alertmanager `webhook_configs`. | | `grafana` <br/> Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). | | `sentry` <br/> Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
- `page` integer
- `per_page` integer

## Response `200`

Paginated set of `AlertSource`

- object
  - `current_page` integer, required
  - `data` AlertSource[], required
    - `id` string, uuid, required: Alert source ID
    - `name` string, required: Name shown on its alerts
    - `type` 'webhook' | 'email' | 'alertmanager' | 'grafana' | 'sentry', required: The external tool behind an alert source; decides how its requests are read. | | |---| | `webhook` <br/> Spectate's own JSON format, for scripts, CI and anything that can call a URL. | | `email` <br/> Emails to the source's own address (subject becomes the alert). | | `alertmanager` <br/> Prometheus Alertmanager `webhook_configs`. | | `grafana` <br/> Grafana Alerting webhook contact point (Alertmanager format plus Grafana links). | | `sentry` <br/> Sentry internal integration webhooks (SaaS and self-hosted), or the legacy WebHooks plugin. |
    - `enabled` boolean, required: Whether requests fire alerts; a disabled source rejects them
    - `webhook_url` string, uri, required: Where the tool sends its webhooks. Secret: rotate it with `rotateAlertSourceToken` if it leaks
    - `email_address` string, email, nullable, required: `email` sources: the address to send mails to. Secret like the URL
    - `has_secret` boolean, required: Whether a signing secret is set (Sentry client secret, Grafana HMAC secret, Alertmanager bearer token); it's never returned
    - `default_severity` 'critical' | 'high' | 'medium' | 'low', required: How urgent an alert or incident is. Escalation paths can branch on it. | | |---| | `critical` <br/> Customers are affected right now. | | `high` <br/> Serious, needs attention soon. | | `medium` <br/> Should be looked at. | | `low` <br/> Informational. |
    - `auto_resolve_minutes` integer, nullable, required: Minutes after which an alert the tool stopped repeating resolves; `null` keeps it until the tool resolves it
    - `settings` AlertSourceSettings, required: Settings of some source types; the others ignore them.
      - `alert_on_new_issues` boolean, nullable, required: Sentry: also alert on every new issue (issue `created` webhooks), not only on alert rules
      - `signature_header` string, nullable, required: Grafana: the header carrying the HMAC signature; `null` means `X-Grafana-Alerting-Signature`
      - `timestamp_header` string, nullable, required: Grafana: the timestamp header, when the contact point signs `{timestamp}:{body}`
    - `project_id` string, uuid, nullable, required: The project whose escalation paths apply when the source has none of its own; `null` for none
    - `escalation_paths` EscalationPathReference[], required: Escalation paths the source's alerts follow. Empty: the project's paths, else the team's default path
      - `id` string, uuid, required: Escalation path ID
      - `name` string, required: Escalation path name
    - `last_event_at` string, date-time, nullable, required: When the source last received a request
    - `events_count` integer, required: Requests the source has received in total
    - `firing_alerts_count` integer, required: Alerts of the source that are firing now
    - `created_at` string, date-time, required: When the source was created
  - `first_page_url` string, nullable, required
  - `from` integer, nullable, required
  - `last_page_url` string, nullable, required
  - `last_page` integer, required
  - `links` object[], required: Generated paginator links.
    - `url` string, nullable, required
    - `label` string, required
    - `active` boolean, required
  - `next_page_url` string, nullable, required
  - `path` string, nullable, required: Base path for paginator generated URLs.
  - `per_page` integer, required: Number of items shown per page.
  - `prev_page_url` string, nullable, required
  - `to` integer, nullable, required: Number of the last item in the slice.
  - `total` integer, required: Total number of items being paginated.

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
