---
title: "Fetching all recent Alerts"
method: GET
path: "/alerts"
tags: ["Alerts"]
---

# Fetching all recent Alerts

`GET /alerts`

Fetches all recent alerts that are displayed in FlockOS

## Query parameters

- `includeInactive` 'true' | 'false'
- `limit` integer
- `offset` integer

## Response `200`

The alerts were successfully fetched.

- object
  - `results` GenericAlert[]
    - `title` string, required — The title for the alert. Example: "An Attempted Break-In Occurred"
    - `description` string — A description for the alert. Example: "There was an attempted break-in detected at 123 Main St."
    - `type` 'vehicle' | 'person' | 'drone' | 'other', required
    - `subType` string — A developer provided type that helps differentiate and organize the various alert types within the UI. You can use alphanumeric characters and dashes as part of the string.
    - `priority` integer, required — The priority of the alert. A priority must be between 1 and 5, where 1 is the highest priority.
    - `eventTime` string, date-time, required — The timestamp (RFC3339 UTC format) of when the event related to this alert occurred.
    - `subjectId` string — The subjectId from the Geo API from which this alert was generated.
    - `ttl` integer — The amount of time (in seconds) that the alert should be visible for. If a TTL is not provided, the alert will remain visible until closed.
    - `location` object, required — The location of the alert. If a subjectId is provided, a location will not be accepted in this request, as the location of the related subject will take priority.
      - `latitude` number, double, required — The latitude of the event that this alert is related to. Precision is only 32 bit so it is only accurate for 6 to 9 decimal places.
      - `longitude` number, double, required — The longitude of the event that this alert is related to. Precision is only 32 bit so it is only accurate for 6 to 9 decimal places.
      - `address` string — The address that this alert is related to.
    - `attachments` Attachment[] — Attachments that will be displayed with the alert.
      - `type` 'link', required — The type of attachment.
      - `name` string, required — The display name for the attachment.
      - `url` string, required — The url for the attachment.
    - `metadata` object — Custom metadata for the alert

## Other responses

- `401` — The provided token is either expired or invalid.
- `429` — Too Many Requests

---

[API](https://skmtc.net/flocksafety/apis/oauth-api.md) · [All operations](https://skmtc.net/flocksafety/apis/oauth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flocksafety/oauth-api/revisions/126df7964ba5/schema)
