---
title: "Create an alert"
method: POST
path: "/alerts"
tags: ["Alerts"]
---

# Create an alert

`POST /alerts`

## Request

- Base URL: `https://outdoorithm.com/api/v1`
- URL: `https://outdoorithm.com/api/v1/alerts`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Create a campsite availability alert. Send an `Idempotency-Key` header to make retries safe. All campgrounds must share one licensed reservation provider.

## Headers

- `Idempotency-Key` string: Unique key to safely retry this create without duplicating.

## Request body

- CreateAlertBody
  - `end_user_id` string: Required for partner keys: your own stable identifier for the customer this alert is for. It isolates the alert from your other customers and is echoed on every webhook. Ignored for personal keys.
  - `name` string, required
  - `description` string
  - `campsites` object[], required: 1–50 entries covering at most 10 distinct campgrounds, all on one reservation provider. Several entries may name campsites within the same campground. One alert is one billable watch regardless of how many entries it carries.
    - `campground_cuid` string, required
    - `campground_name` string
    - `campsite_id` string
    - `campsite_name` string
  - `date_type` 'range' | 'perpetual' | 'specific_months'
  - `start_date` string, required
  - `end_date` string
  - `specific_months` integer[]
  - `recurring` boolean
  - `days_of_week` integer[]: 0=Mon … 6=Sun.
  - `min_nights` integer
  - `max_nights` integer
  - `notify_email` boolean
  - `notify_sms` boolean
  - `notify_in_app` boolean

## Response `201`

The created alert.

- object
  - `data` Alert, required
    - `object` 'alert', required
    - `id` string, required
    - `end_user_id` string: Partner keys only: your own identifier for the customer this alert belongs to.
    - `name` string, required
    - `description` string, nullable, required
    - `status` string, required: active | paused | expired | error | permanent_error
    - `provider` string, nullable, required
    - `campsites` object[], required
      - `campground_cuid` string, required
      - `campground_name` string, nullable, required
      - `campsite_id` string, nullable, required
      - `campsite_name` string, nullable, required
    - `date_type` string, nullable, required
    - `start_date` string, nullable, required
    - `end_date` string, nullable, required
    - `specific_months` integer[], nullable, required
    - `days_of_week` integer[], nullable, required
    - `min_nights` integer, nullable, required
    - `max_nights` integer, nullable, required
    - `recurring` boolean, nullable, required
    - `notify_email` boolean, nullable, required
    - `notify_sms` boolean, nullable, required
    - `notify_in_app` boolean, nullable, required
    - `check_interval_seconds` integer, nullable, required
    - `last_checked_at` string, nullable, required
    - `next_check_at` string, nullable, required
    - `total_notifications_sent` integer, required
    - `created_at` string, nullable, required
    - `updated_at` string, nullable, required

## Other responses

- `401`: Missing or invalid API key.
- `403`: Plan alert limit reached (code: quota_exceeded).
- `409`: Idempotency-Key conflict.
- `422`: Invalid alert body.
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/outdoorithm/apis/outdoorithm-api.md) · [All operations](https://skmtc.dev/outdoorithm/apis/outdoorithm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/outdoorithm/apis/outdoorithm-api/revisions/2cdb8f1f7df2?raw)
