API & Webhooks

Integrate KeelPilot with your own tools in three ways: the public REST API (/api/v1) to read data and create alerts, incidents and metrics; the MCP server, to ask Claude about your infrastructure in plain language; and outbound webhooks, which notify your systems of each event.

Before you start

  • You must be the owner or an admin to create API keys and webhooks: the “API keys” block (Settings → Integrations) and the “Webhooks” block (Settings → Notifications) only show up for them.
  • Active API keys per organization: Free 2, Pro 10, Enterprise 50.
  • API requests per organization every 15 minutes: Free 1,000, Pro 4,000, Enterprise 20,000 (the trial uses Pro's). The quota is shared by all the keys of the organization; creating more keys does not raise it.
  • Active webhooks: Free none, Pro 3, Enterprise unlimited (the trial allows 3).
  • Some endpoints require the plan feature they read (table below). See Plans & limits.

Create an API key

  1. 1Open Settings → Integrations (/settings/integraciones) and go to the API keys block.
  2. 2Click Crear API Key.
  3. 3Fill in Nombre descriptivo (e.g. “CI/CD Pipeline, Monitoring Script”) and, in Scopes (permisos), tick Lectura or Escritura for each area. Escritura also ticks Lectura.
  4. 4Click Crear and copy the token right away: “Este token no se mostrará de nuevo”. It starts with kp_.
Create API key dialog with descriptive name and read/write scopes per area
API keys card with the new token shown once, highlighted, and the key in the list

Clicking a key opens “Estadísticas de uso” (last 24 hours, 7 days and 30 days, and “Desglose por endpoint”). The trash icon revokes it; revoking cannot be undone.

API key usage statistics for 24 hours, 7 and 30 days with the breakdown by endpoint

Call the API

Send the key in the Authorization header of every request:

curl -H "Authorization: Bearer kp_..." https://app.keelpilot.io/api/v1/clusters

Responses are { data, pagination? } and errors { error, code }. The interactive documentation (Swagger UI) is at https://app.keelpilot.io/api/docs and the OpenAPI spec, without authentication, at https://app.keelpilot.io/api/v1/openapi.json.

Swagger UI of the KeelPilot public API
ScopeEndpoints (under /api/v1)Plan
read:clustersGET /clustersEvery plan
read:alerts / write:alertsGET /alerts, POST /alertsEvery plan
read:incidents / write:incidentsGET /incidents, GET /incidents/{id}, POST /incidentsPro / Enterprise
read:costsGET /costs/summary, /costs/anomalies, /costs/recommendationsEvery plan
read:secretsGET /secretsPro / Enterprise
read:complianceGET /compliance/resultsEnterprise
read:securityGET /security/findingsEvery plan
read:billingGET /usageEvery plan
write:metricsPOST /metricsEvery plan
read:monitorsGET /monitors, /monitors/{id}, /monitors/{id}/uptime, /periods, /regionsPro / Enterprise
read:aiopsGET /anomaliesPro / Enterprise
read:changesGET /changesPro / Enterprise
read:runbooksGET /runbooks, /runbooks/executionsPro / Enterprise
read:resourcesGET /infrastructure/resources, /infrastructure/graphPro / Enterprise
read:slosGET /slosPro / Enterprise

The plan checked is the organization's, not the key creator's. During the trial every endpoint is enabled.

Connect KeelPilot to Claude (MCP)

KeelPilot is an MCP server at https://app.keelpilot.io/api/v1/mcp and uses the same API keys. In Claude Code:

claude mcp add --transport http keelpilot https://app.keelpilot.io/api/v1/mcp --header "Authorization: Bearer kp_..."
  • Each GET endpoint of the API is a tool, and Claude only gets the tools whose scope the key has. Create a key just for Claude with the read scopes you want to share.
  • It is read-only: creating alerts, incidents or metrics is not exposed.
  • Each tool call counts against the organization's API quota and respects the plan of each endpoint. Very large answers are cut at 100,000 characters; use filters or pagination.
  • Other MCP clients (Claude Desktop, claude.ai and others) use the same URL and header, if the client lets you set the Authorization header.

Webhooks per event

  1. 1In Settings → Notifications (/settings/notificaciones), Webhooks block, click Create webhook.
  2. 2Fill in URL del endpoint (HTTPS) and tick the Eventos you want (table below).
  3. 3Click Crear. KeelPilot first sends a test POST ({"type":"ping",…}) and only saves the webhook if your endpoint answers 2xx.
  4. 4Copy the secret: “Este secreto no se mostrará de nuevo”. You need it to validate the signature.
Create webhook dialog with endpoint URL and selected events, Create highlighted
EventLabel in the appWhen it is sent
alert.triggeredAlerta disparadaA new alert, or one that gets worse
alert.resolvedAlerta resueltaAn alert is resolved
incident.createdIncidente creadoAn incident is created (by hand or automatically from an alert)
incident.updatedIncidente actualizadoSeverity, assignee or a status other than resolved changes
incident.resolvedIncidente resueltoAn incident is resolved
deploy.startedDeploy iniciadoA pipeline starts (from the app or CI auto-deploy)
deploy.completedDeploy completadoA pipeline ends (success, failure or rollback), or a CI event arrives
security.findingHallazgo de seguridadA Security Posture audit ends with findings (up to 50 per event)
cost.anomalyAnomalía de costosA cost anomaly alert comes in
compliance.violationViolación de complianceA CIS scan ends with failures
ecs.env_deployECS: variables desplegadasThe environment variables of an ECS service are deployed
ecs.force_deployECS: redespliegue forzadoAn ECS service is force-redeployed
ecs.rollbackECS: rollbackAn ECS service is rolled back to an earlier revision
budget.thresholdPresupuesto: umbral alcanzadoThe month’s spend crosses the alert % of a monthly budget (daily check)

Each delivery is a JSON POST with these headers:

X-Webhook-Signature: sha256=<HMAC-SHA256 hex of the raw body, with the webhook secret>
X-Webhook-Event: incident.created
X-Webhook-Delivery: 42

{ "type": "incident.created", "timestamp": "2026-10-23T12:00:00.000Z", "data": { ... } }
  • Validate the signature by computing the HMAC-SHA256 of the raw body with your secret and comparing it with X-Webhook-Signature.
  • Up to 5 attempts: the first one within seconds and retries after 5 minutes, 30 minutes, 2 hours and 24 hours. Any 2xx counts as delivered.
  • After 10 failed attempts in a row the webhook is disabled. Turn it back on with the status button of the row (this counts against the quota again).
  • The eye icon opens “Log de deliveries” with each attempt, its response code and error.

Every outgoing webhook of the organization lives in this list: each one receives only the events you tick, including the monthly budget alert (budget.threshold) and the ECS events. Alert notifications to Slack, Teams and other channels are explained in Alerting.

How to verify

  • Calling GET /api/v1/clusters with the key returns 200 and your clusters; the key's “Último uso” column updates.
  • In Claude Code, /mcp lists keelpilot as connected, with the tools of the key's scopes.
  • After the next event, “Log de deliveries” shows the delivery with code 2xx.

Troubleshooting

401 “API key required. Use the Authorization: Bearer kp_... header”.

Cause: The request has no Authorization header, or the token does not start with kp_.

Fix: Send Authorization: Bearer kp_... exactly like that.

401 “Invalid or revoked API key”.

Cause: The key was revoked or mistyped.

Fix: Create a new key in Settings → Integrations → API keys.

403 “Insufficient scope. Required: read:incidents”.

Cause: The key does not have the scope of that endpoint (or of that MCP tool).

Fix: Scopes cannot be edited: create a new key with the scope you need.

403 PLAN_FEATURE_REQUIRED “This feature is not included in your current plan (incidents)…”.

Cause: The organization’s plan does not include what that endpoint reads.

Fix: Upgrade the plan (Plans & limits).

429 RATE_LIMIT_EXCEEDED “Request limit exceeded. Try again later.”

Cause: The organization used its requests for the 15-minute window. MCP tool calls count too.

Fix: Wait for the window to reset, spread the calls out, or upgrade the plan.

“You reached the API key limit for the free plan (2). Upgrade your plan to create more.”

Cause: The organization has all the active keys its plan allows.

Fix: Revoke a key you no longer use or upgrade the plan.

“Your plan allows up to N active webhooks. Disable one you no longer use or upgrade your plan.”

Cause: Free has no webhooks; Pro allows 3 active ones.

Fix: Disable a webhook or upgrade the plan.

“Could not validate the webhook URL. Check that it responds with HTTP 2xx.”

Cause: The test POST did not get a 2xx, timed out after 10 seconds, or the URL points to a private address.

Fix: Make the endpoint public and have it answer 2xx to any POST, including the ping.