API Reference
All endpoints require authentication via the Authorization: Bearer YOUR_API_KEY header.
Base URL
https://cloudlink-agents-production.up.railway.app
Authentication
Include your API key in every request:
curl -H "Authorization: Bearer cl_live_your_key_here" \ https://your-api-url/stats
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /stats | Action counts + resource count for the current tenant |
| GET | /resources | List discovered AWS resources |
| GET | /credentials | List cloud credentials (secrets masked) |
| POST | /credentials | Add a cloud credential |
| DELETE | /credentials/:id | Remove a credential |
| POST | /scan | Trigger an AWS scan across all credentials |
| GET | /scans | List scan history |
| POST | /deploys | Record a deploy event |
| GET | /deploys | List deploy events |
| GET | /regressions | List cost regressions (filter by ?status=open|acknowledged|resolved) |
| POST | /regressions/:id/acknowledge | Acknowledge a regression |
| POST | /regressions/:id/resolve | Resolve a regression |
| POST | /regression/run | Manually trigger regression detection |
| GET | /cost-snapshots | List hourly cost snapshots |
| GET | /cost-snapshots/services | List tracked AWS services |
| GET | /actions | List actions (filter by ?status=) |
| POST | /actions/:id/approve | Approve a pending action |
| POST | /actions/:id/reject | Reject a pending action |
| GET | /webhooks | List registered webhooks |
| POST | /webhooks | Register a new webhook |
| DELETE | /webhooks/:id | Remove a webhook |
| GET | /audit | Query audit log (filter by ?event_type=, ?since=) |
| GET | /subscription/:clerk_user_id | Get subscription status for a user |
| GET | /budgets | List all budget guardrails with current spend |
| POST | /budgets | Create a new budget guardrail |
| PUT | /budgets/:id | Update a budget |
| DELETE | /budgets/:id | Delete a budget |
| GET | /budgets/alerts | List budget alert history |
| POST | /budgets/check | Manually trigger budget threshold checks |
| POST | /cost-estimate | Predict cost impact of a deploy before it goes live |
| GET | /anomalies | Scan all services for cost anomalies (ML-powered) |
| GET | /anomalies/:service | Analyze a specific service for cost anomalies |
Response format
All responses are JSON. Successful responses return the data directly. Errors return:
{
"detail": "Error message here"
}Rate limits
API requests are rate-limited per tenant:
/scan— 5 requests per minute/regression/run— 5 requests per minute- All other endpoints — 60 requests per minute
Interactive docs
For request/response schemas, visit the auto-generated Swagger UI at /docs on your API instance.