Docs

GET /v1/alerts

Retrieve threshold breach alerts from your mobile and web apps — pre-scored and ready for AI agent action.

API

GET /v1/alerts

Threshold breaches, pre-scored and queued — ready for your AI agent to consume and act on.

Request

GET https://api.coolcoding.co.uk/v1/alerts

Query Parameters

Parameter Type Required Default Description
app_id string null Filter by app
status string open open · acknowledged · resolved
severity string all critical · warning
from string -24h Time range start
limit integer 20 Max results. Max 200

Example Request

curl -G https://api.coolcoding.co.uk/v1/alerts \
  -H "Authorization: Bearer cc-YOUR_API_KEY" \
  --data-urlencode "app_id=my-app" \
  --data-urlencode "status=open" \
  --data-urlencode "severity=critical"

Python:

import requests

response = requests.get(
    "https://api.coolcoding.co.uk/v1/alerts",
    headers={"Authorization": "Bearer cc-YOUR_API_KEY"},
    params={"app_id": "my-app", "status": "open", "severity": "critical"}
)
print(response.json())

JavaScript:

const response = await fetch(
  `https://api.coolcoding.co.uk/v1/alerts?app_id=my-app&status=open&severity=critical`,
  { headers: { "Authorization": "Bearer cc-YOUR_API_KEY" } }
);
console.log(await response.json());

Response

{
  "alerts": [
    {
      "id": "alt_3f9c2b",
      "app_id": "my-app",
      "severity": "critical",
      "status": "open",
      "title": "Crash rate spike — iOS 18.1",
      "description": "Crash-free session rate dropped from 99.8% to 96.2% on iOS 18.1 in the last 30 minutes.",
      "signal_ids": ["sig_x9f2a1", "sig_x9f2a2"],
      "triggered_at": "2026-05-13T09:05:00Z",
      "pattern": "crash_rate_spike",
      "recommended_action": "Review stack traces in /v1/signals?type=crash&app_version=2.4.1",
      "score": 0.96
    }
  ],
  "total": 1,
  "request_id": "req_4c7e1a",
  "usage": { "credits": 1 }
}

recommended_action is a pre-written context string your AI agent can read directly to decide its next API call.

Error Responses

Code Meaning
400 Bad Request — missing or invalid parameters
401 Unauthorized — API key missing or invalid
429 Too Many Requests — rate limit exceeded
432 Plan limit exceeded — upgrade your plan
500 Internal Server Error

429 example:

{
  "error": "Rate limit exceeded. Please reduce request frequency.",
  "retry_after": 60
}

Implement retry logic that respects the retry-after header value.