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

MethodPathDescription
GET/statsAction counts + resource count for the current tenant
GET/resourcesList discovered AWS resources
GET/credentialsList cloud credentials (secrets masked)
POST/credentialsAdd a cloud credential
DELETE/credentials/:idRemove a credential
POST/scanTrigger an AWS scan across all credentials
GET/scansList scan history
POST/deploysRecord a deploy event
GET/deploysList deploy events
GET/regressionsList cost regressions (filter by ?status=open|acknowledged|resolved)
POST/regressions/:id/acknowledgeAcknowledge a regression
POST/regressions/:id/resolveResolve a regression
POST/regression/runManually trigger regression detection
GET/cost-snapshotsList hourly cost snapshots
GET/cost-snapshots/servicesList tracked AWS services
GET/actionsList actions (filter by ?status=)
POST/actions/:id/approveApprove a pending action
POST/actions/:id/rejectReject a pending action
GET/webhooksList registered webhooks
POST/webhooksRegister a new webhook
DELETE/webhooks/:idRemove a webhook
GET/auditQuery audit log (filter by ?event_type=, ?since=)
GET/subscription/:clerk_user_idGet subscription status for a user
GET/budgetsList all budget guardrails with current spend
POST/budgetsCreate a new budget guardrail
PUT/budgets/:idUpdate a budget
DELETE/budgets/:idDelete a budget
GET/budgets/alertsList budget alert history
POST/budgets/checkManually trigger budget threshold checks
POST/cost-estimatePredict cost impact of a deploy before it goes live
GET/anomaliesScan all services for cost anomalies (ML-powered)
GET/anomalies/:serviceAnalyze 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.