---
title: "Create Alert"
method: POST
path: "/api/alerts"
tags: ["Vehicle Alerts"]
---

# Create Alert

`POST /api/alerts`

## Request

- Base URL: `https://pegarex.com.br` (the document declares no server; this is the origin it was published from)
- URL: `https://pegarex.com.br/api/alerts`
- Auth: HTTP bearer

Create a new vehicle alert — at most MAX_ALERTS_PER_USER per account.

Counts every alert the user has, active or not: that is the list the alerts
page shows, so the limit matches what the user can see and delete.

## Request body

- VehicleAlertRequest
  - `brand` string, nullable
  - `model` string, nullable
  - `version` string, nullable
  - `brand_id` integer, nullable
  - `model_id` integer, nullable
  - `version_id` integer, nullable
  - `min_year` integer, nullable
  - `max_year` integer, nullable
  - `min_price` number, nullable
  - `max_price` number, nullable
  - `fuel_type` union
    - string
    - string[]
  - `transmission` union
    - string
    - string[]
  - `mileage_min` integer, nullable
  - `mileage_max` integer, nullable
  - `location` string, nullable
  - `category` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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