Skip to main content
Creates an Availability Alert
curl --request POST \
  --url https://api.campflare.com/v2/alert/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "parameters": {
    "date_ranges": [
      {
        "starting_date": "2023-12-25",
        "nights": 123
      }
    ],
    "status": [
      "available"
    ],
    "campsite_kinds": [
      "standard"
    ],
    "min_rv_length": 123,
    "min_trailer_length": 123
  },
  "campground_ids": [
    "<string>"
  ],
  "metadata": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "active",
  "campground_ids": [
    "<string>"
  ],
  "parameters": {
    "date_ranges": [
      {
        "starting_date": "2023-12-25",
        "nights": 123
      }
    ],
    "status": [
      "available"
    ],
    "campsite_kinds": [
      "standard"
    ],
    "min_rv_length": 123,
    "min_trailer_length": 123
  },
  "created_at": "2023-11-07T05:31:56Z",
  "notifications": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sent_at": "2023-11-07T05:31:56Z",
      "campground_id": "<string>",
      "campsite_id": "<string>",
      "webhook_status": "delivered",
      "date_range": {
        "starting_date": "2023-12-25",
        "nights": 123
      },
      "webhook_http_response_code": "<string>"
    }
  ],
  "canceled_at": "2023-11-07T05:31:56Z",
  "metadata": {}
}
This endpoint creats an Alert, and immediately starts it. The Alert will run indefinitely until canceled, or until all of the dates are in the past.

Body

application/json

Alert parameters

parameters
object
required

Availability parameters. When these are set, the alert will trigger each time availability of the specified campgrounds matches the this criteria. These are the same as the parameters used in the campground search endpoint, which may be helpful for debugging and previewing alert parameters.

campground_ids
string[]
required

Array of campground IDs to watch. Limited to 12 campgrounds.

metadata
object

A mapping of any data you wish to associate with the alert which will be sent with each notification to the webhook. Limited to 2kb.

Response

Alert response

id
string<uuid>
required

Unique identifier for the alert

status
enum<string>
required

Status of the alert

Available options:
active,
canceled,
expired
campground_ids
string[]
required
parameters
object
required
created_at
string<date-time>
required

Timestamp of the alert creation

notifications
object[]
required
canceled_at
string<date-time>

Timestamp of the last update (when/if canceled)

metadata
object

The additional metadata associated with the alert when created