---
title: "Cria alerta (webhook HTTPS ou e-mail)"
method: POST
path: "/api/v1/alertas"
tags: ["Alertas"]
---

# Cria alerta (webhook HTTPS ou e-mail)

`POST /api/v1/alertas`

## Request

- Base URL: `https://api.ragjur.ai`
- URL: `https://api.ragjur.ai/api/v1/alertas`
- Auth: one of:
  - API key in header `x-api-key`
  - OAuth 2 (authorization code, authorization URL `https://mcp.ragjur.ai/oauth/authorize`, token URL `https://mcp.ragjur.ai/oauth/token`, scopes: `ragjur:read`)

## Request body

- AlertaInput
  - `tipo` 'taxa_queda' | 'taxa_alta' | 'nova_decisao' | 'mudanca_entendimento', required
  - `fonte` string, required
  - `busca` string
  - `turma` string
  - `threshold` number: Obrigatório para `taxa_queda`/`taxa_alta` (pontos percentuais)
  - `webhook_url` string, uri: HTTPS público (hosts privados rejeitados)
  - `email` string, email
  - `descricao` string

## Response `201`

Criado

- Alerta
  - `tipo` 'taxa_queda' | 'taxa_alta' | 'nova_decisao' | 'mudanca_entendimento', required
  - `fonte` string, required
  - `busca` string
  - `turma` string
  - `threshold` number: Obrigatório para `taxa_queda`/`taxa_alta` (pontos percentuais)
  - `webhook_url` string, uri: HTTPS público (hosts privados rejeitados)
  - `email` string, email
  - `descricao` string
  - `id` string
  - `criado_em` string, date-time
  - `ativo` boolean

## Other responses

- `400`: Parâmetro obrigatório ausente ou inválido
- `401`: Sem `x-api-key` ou chave inválida
- `403`: Chave desativada
- `429`: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
- `500`: Erro interno

---

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