Two credentials

Only ERROR logs trigger aggregated alerts. INFO, WARN, DEBUG, and TRACE are accepted but do not notify.

Create a user

Bootstrap a user record. Full login is not implemented yet — this step registers an owner for your apps.

curl
curl -X POST __API_BASE_URL__/api/v1/users \
  -H "Content-Type: application/json" \
  -d '{
    "email": "dev@example.com",
    "username": "devuser"
  }'

Register your app

Register the application or service that will send logs to PrairieLog API.

curl
curl -X POST __API_BASE_URL__/api/v1/apps \
  -H "Content-Type: application/json" \
  -d '{
    "name": "payment-service",
    "description": "Sends live logs from the payment API."
  }'

Generate an ingestion token

The raw token is returned once at creation. Copy it immediately into a server env var (for example PRAIRIELOG_TOKEN). The API will not show the full token again.

Dashboard note: when you generate a token in the dashboard, it stays in this browser tab only until you refresh. Copy it before leaving the page.

curl
curl -X POST __API_BASE_URL__/api/v1/apps/{appId}/tokens \
  -H "Content-Type: application/json" \
  -d '{
    "name": "local-dev-token"
  }'

Add an alert destination

Register the Slack or Discord incoming webhook URL where you want alerts delivered. This is not the same as your ingestion token — it is the channel endpoint PrairieLog posts to.

curl
curl -X POST __API_BASE_URL__/api/v1/apps/{appId}/alert-destinations \
  -H "Content-Type: application/json" \
  -d '{
    "type": "DISCORD",
    "name": "dev-alerts",
    "webhookUrl": "https://discord.com/api/webhooks/..."
  }'

Destination types: SLACK or DISCORD. Webhook URLs are stored by the API but never returned in full from list endpoints.

Test your alert destination

Send a test message to confirm PrairieLog can reach your Slack or Discord channel.

curl
curl -X POST \
  __API_BASE_URL__/api/v1/apps/{appId}/alert-destinations/{destinationId}/test

Send a log event

POST a JSON log event from your app using your ingestion token (not the alert webhook).

JSON payload
{
  "id": "demo-error-001",
  "level": "ERROR",
  "message": "Failed to process payment for user 123.",
  "occurredAt": "2026-06-08T18:30:00Z",
  "logger": "com.example.PaymentService",
  "traceId": "trace-abc-123",
  "metadata": {
    "endpoint": "/payments",
    "userId": 42
  }
}
curl
curl -X POST __API_BASE_URL__/api/v1/log-events \
  -H "Content-Type: application/json" \
  -H "X-Ingestion-Token: YOUR_INGESTION_TOKEN" \
  -d '{
    "id": "demo-error-001",
    "level": "ERROR",
    "message": "Failed to process payment for user 123.",
    "occurredAt": "2026-06-08T18:30:00Z",
    "logger": "com.example.PaymentService",
    "traceId": "trace-abc-123"
  }'

Use level: "ERROR" to trigger aggregated alerts. Other levels are accepted but do not notify.