> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revalonlabs.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Alerts API — Price Movement Notifications

> Create and manage price movement alerts on canonical questions or platform markets. Get notified when a market's probability crosses a threshold you set.

Alerts let you define conditions on prediction market prices and receive a notification when those conditions are met. For example, you can set an alert to fire when the probability on "Will BTC reach \$100k by 2026?" drops below 0.50, or when the index price divergence spikes above a threshold. Alerts are scoped to your authenticated account.

## Authentication

A session JWT or SIWE session cookie is required:

```
Authorization: Bearer <your_jwt>
```

## Endpoints

| Method   | Path                  | Description                            |
| -------- | --------------------- | -------------------------------------- |
| `GET`    | `/api/v1/alerts`      | List all your active alerts            |
| `POST`   | `/api/v1/alerts`      | Create a new alert                     |
| `GET`    | `/api/v1/alerts/{id}` | Get a single alert                     |
| `PATCH`  | `/api/v1/alerts/{id}` | Update alert condition or active state |
| `DELETE` | `/api/v1/alerts/{id}` | Delete an alert                        |

***

## List alerts

```
GET https://api.predexy.com/api/v1/alerts
```

Returns all alerts associated with your account.

### Example request

```bash cURL theme={null}
curl https://api.predexy.com/api/v1/alerts \
  -H "Authorization: Bearer <your_jwt>"
```

### Sample response

```json theme={null}
{
  "data": [
    {
      "id": "alrt-3fa85f64-0000-0000-0000-000000000001",
      "type": "price_threshold",
      "canonical_question_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "condition": {
        "field": "index_price",
        "operator": "below",
        "value": 0.50
      },
      "is_active": true,
      "created_at": "2026-04-20T08:00:00Z"
    }
  ]
}
```

***

## Create an alert

```
POST https://api.predexy.com/api/v1/alerts
```

Creates a new price movement alert. Attach the alert to a canonical question or a specific platform market.

### Request body

<ParamField body="type" type="string" required>
  Alert type. Use `"price_threshold"` to trigger when a price crosses a value.
</ParamField>

<ParamField body="condition" type="object" required>
  Alert condition object. The structure depends on `type`, but typically includes a `field` to watch, an `operator` (`above`, `below`, `equals`), and a `value`.
</ParamField>

<ParamField body="canonical_question_id" type="string">
  UUID of the canonical question to watch. Monitors the cross-platform index price.
</ParamField>

<ParamField body="market_id" type="string">
  UUID of a specific platform market to watch. Monitors that platform's price directly.
</ParamField>

### Example request

```bash cURL theme={null}
curl -X POST https://api.predexy.com/api/v1/alerts \
  -H "Authorization: Bearer <your_jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "price_threshold",
    "canonical_question_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "condition": {
      "field": "index_price",
      "operator": "below",
      "value": 0.50
    }
  }'
```

### Sample response

```json theme={null}
{
  "data": {
    "id": "alrt-3fa85f64-0000-0000-0000-000000000001",
    "type": "price_threshold",
    "canonical_question_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "condition": {
      "field": "index_price",
      "operator": "below",
      "value": 0.50
    },
    "is_active": true,
    "created_at": "2026-04-25T15:30:00Z"
  }
}
```

***

## Update an alert

```
PATCH https://api.predexy.com/api/v1/alerts/{id}
```

Update the condition or toggle the active state of an existing alert without deleting and recreating it.

### Request body

<ParamField body="type" type="string">
  New alert type.
</ParamField>

<ParamField body="condition" type="object">
  Updated condition object.
</ParamField>

<ParamField body="is_active" type="boolean">
  Set to `false` to pause the alert without deleting it.
</ParamField>

<Tip>
  Use `is_active: false` to temporarily silence an alert — for example, during a period when you know prices will be volatile and you want to reduce notification noise. Toggle it back to `true` when you want to resume monitoring.
</Tip>
