API Reference

Integrate APIDrift into your workflow

Authentication

APIDrift API uses session-based authentication. After you sign in, requests are authenticated with the session cookie stored in your browser.

Session

Logged in session cookie (sent automatically by the browser)

Example

curl https://apidrift.com/api/monitors \
  --cookie "<your-session-cookie>"

Requests without a valid session return 401 Unauthorized. API keys are Coming Soon.

Monitors

GET/api/monitors

Retrieve all monitors for the authenticated user, including the count of changes detected in the last 7 days.

Example Request

curl https://apidrift.com/api/monitors \
  --cookie "<your-session-cookie>"

Response

{
  "monitors": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Stripe API",
      "url": "https://api.stripe.com/openapi/spec",
      "type": "openapi",
      "check_interval": 60,
      "is_active": true,
      "last_checked_at": "2026-03-18T09:30:00Z",
      "last_snapshot": null,
      "created_at": "2026-03-01T12:00:00Z",
      "updated_at": "2026-03-18T09:30:00Z",
      "recent_change_count": 3
    }
  ]
}
POST/api/monitors

Create a new monitor. The check interval is subject to your plan's minimum.

Parameters

ParameterTypeRequiredDescription
namestringYesMonitor name (1–120 chars)
urlstringYesURL to monitor (must be valid URL)
typestringYes"openapi"
check_intervalnumberYesCheck interval in minutes
is_activebooleanNoWhether the monitor is active (default: true)

Example Request

curl -X POST https://apidrift.com/api/monitors \
  --cookie "<your-session-cookie>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Stripe API",
    "url": "https://api.stripe.com/openapi/spec",
    "type": "openapi",
    "check_interval": 60
  }'

Response

{
  "monitor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Stripe API",
    "url": "https://api.stripe.com/openapi/spec",
    "type": "openapi",
    "check_interval": 60,
    "is_active": true,
    "last_checked_at": null,
    "last_snapshot": null,
    "created_at": "2026-03-18T12:00:00Z",
    "updated_at": "2026-03-18T12:00:00Z"
  }
}
GET/api/monitors/:id

Retrieve a single monitor with its recent change history (up to 100 changes, newest first).

Example Request

curl https://apidrift.com/api/monitors/550e8400-e29b-41d4-a716-446655440000 \
  --cookie "<your-session-cookie>"

Response

{
  "monitor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Stripe API",
    "url": "https://api.stripe.com/openapi/spec",
    "type": "openapi",
    "check_interval": 60,
    "is_active": true,
    "last_checked_at": "2026-03-18T09:30:00Z",
    "last_snapshot": "...",
    "created_at": "2026-03-01T12:00:00Z",
    "updated_at": "2026-03-18T09:30:00Z"
  },
  "changes": [
    {
      "id": "change-uuid",
      "monitor_id": "550e8400-e29b-41d4-a716-446655440000",
      "change_type": "breaking",
      "severity": "critical",
      "summary": "Removed endpoint POST /v1/charges",
      "diff": "...",
      "detected_at": "2026-03-17T15:00:00Z",
      "notified": true
    }
  ]
}
PATCH/api/monitors/:id

Update a monitor. At least one field must be provided.

Parameters

ParameterTypeRequiredDescription
namestringNoMonitor name (1–120 chars)
urlstringNoURL to monitor
typestringNo"openapi"
check_intervalnumberNoCheck interval in minutes
is_activebooleanNoWhether the monitor is active

Example Request

curl -X PATCH https://apidrift.com/api/monitors/550e8400-e29b-41d4-a716-446655440000 \
  --cookie "<your-session-cookie>" \
  -H "Content-Type: application/json" \
  -d '{"name": "Stripe API (v2)", "check_interval": 30}'

Response

{
  "monitor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Stripe API (v2)",
    "url": "https://api.stripe.com/openapi/spec",
    "type": "openapi",
    "check_interval": 30,
    "is_active": true,
    "last_checked_at": "2026-03-18T09:30:00Z",
    "last_snapshot": "...",
    "created_at": "2026-03-01T12:00:00Z",
    "updated_at": "2026-03-18T12:05:00Z"
  }
}
DELETE/api/monitors/:id

Delete a monitor. This also removes all associated change history.

Example Request

curl -X DELETE https://apidrift.com/api/monitors/550e8400-e29b-41d4-a716-446655440000 \
  --cookie "<your-session-cookie>"

Response

{
  "success": true
}

Changes

GET/api/changes

Retrieve detected changes across all your monitors, newest first (up to 100). Optionally filter by severity.

Parameters

ParameterTypeRequiredDescription
severitystringNoQuery param. "critical" | "warning" | "info"

Example Request

curl "https://apidrift.com/api/changes?severity=critical" \
  --cookie "<your-session-cookie>"

Response

{
  "changes": [
    {
      "id": "change-uuid",
      "monitor_id": "550e8400-e29b-41d4-a716-446655440000",
      "change_type": "breaking",
      "severity": "critical",
      "summary": "Removed endpoint POST /v1/charges",
      "diff": "- POST /v1/charges\n+ (removed)",
      "previous_snapshot": "...",
      "new_snapshot": "...",
      "detected_at": "2026-03-17T15:00:00Z",
      "notified": true
    }
  ]
}

Impact Analyses

GET/api/impact-analyses

Retrieve AI-powered impact analyses for a specific change. Returns breaking change detection, affected endpoints and fields, severity assessment, and recommended actions.

Parameters

ParameterTypeRequiredDescription
change_idstringYesUUID of the change to analyze

Example Request

curl "https://apidrift.com/api/impact-analyses?change_id=change-uuid" \
  --cookie "<your-session-cookie>"

Response

{
  "impact_analyses": [
    {
      "id": "ia-uuid",
      "change_id": "change-uuid",
      "is_breaking": true,
      "confidence": 0.95,
      "affected_endpoints": [
        "POST /v1/charges",
        "GET /v1/charges/:id"
      ],
      "affected_fields": [
        "source",
        "payment_method"
      ],
      "severity": "critical",
      "summary": "Removal of POST /v1/charges breaks all direct charge creation flows",
      "reasoning": "The endpoint was the primary method for creating charges. All integrations using direct charge creation will fail.",
      "recommended_action": "Migrate to Payment Intents API (POST /v1/payment_intents) before the deprecation deadline.",
      "created_at": "2026-03-17T15:05:00Z"
    }
  ]
}

Migration Guides

GET/api/migration-guides

Retrieve auto-generated migration guides for a change or impact analysis. Includes step-by-step instructions, before/after code examples, warnings, and effort estimates.

Parameters

ParameterTypeRequiredDescription
change_idstringNoUUID of the change
impact_analysis_idstringNoUUID of the impact analysis

Example Request

curl "https://apidrift.com/api/migration-guides?change_id=change-uuid" \
  --cookie "<your-session-cookie>"

Response

{
  "migration_guides": [
    {
      "id": "mg-uuid",
      "change_id": "change-uuid",
      "impact_analysis_id": "ia-uuid",
      "title": "Migrate from Charges API to Payment Intents",
      "steps": [
        "Replace POST /v1/charges with POST /v1/payment_intents",
        "Update the request body: 'amount' and 'currency' remain the same",
        "Handle the new 'status' field in the response",
        "Add confirmation handling for 3D Secure flows"
      ],
      "before_code": "const charge = await stripe.charges.create({\n  amount: 2000,\n  currency: 'usd',\n  source: 'tok_visa'\n});",
      "after_code": "const intent = await stripe.paymentIntents.create({\n  amount: 2000,\n  currency: 'usd',\n  payment_method: 'pm_card_visa',\n  confirm: true\n});",
      "warnings": [
        "3D Secure authentication may require additional client-side handling",
        "Webhook event names change from charge.* to payment_intent.*"
      ],
      "estimated_effort": "2-4 hours per integration point",
      "created_at": "2026-03-17T15:10:00Z"
    }
  ]
}

Auto Patches

GET/api/auto-patches

List auto-generated patch PRs created by APIDrift's SDK Auto-Patcher. These PRs automatically update your SDK integration code when breaking changes are detected.

Example Request

curl https://apidrift.com/api/auto-patches \
  --cookie "<your-session-cookie>"

Response

{
  "auto_patches": [
    {
      "id": "ap-uuid",
      "change_id": "change-uuid",
      "repository": "acme/payments-service",
      "branch_name": "apidrift/migrate-charges-to-payment-intents",
      "pr_number": 142,
      "pr_url": "https://github.com/acme/payments-service/pull/142",
      "status": "open",
      "files_scanned": 24,
      "files_modified": 3,
      "file_details": [
        {
          "path": "src/billing/charge.ts",
          "additions": 12,
          "deletions": 8
        },
        {
          "path": "src/billing/refund.ts",
          "additions": 5,
          "deletions": 3
        },
        {
          "path": "tests/billing.test.ts",
          "additions": 18,
          "deletions": 10
        }
      ],
      "created_at": "2026-03-17T16:00:00Z"
    }
  ]
}

Alerts

GET/api/alerts

List all alert configurations for the authenticated user.

Example Request

curl https://apidrift.com/api/alerts \
  --cookie "<your-session-cookie>"

Response

{
  "alerts": [
    {
      "id": "alert-uuid",
      "user_id": "user-uuid",
      "monitor_id": null,
      "channel": "slack",
      "destination": "https://hooks.slack.com/services/T00/B00/xxx",
      "severity_filter": ["critical", "warning"],
      "is_active": true,
      "created_at": "2026-03-10T08:00:00Z"
    }
  ]
}
POST/api/alerts

Create a new alert configuration. Set monitor_id to null to receive alerts for all monitors.

Parameters

ParameterTypeRequiredDescription
channelstringYes"email" | "slack" | "discord" | "webhook"
destinationstringYesEmail address, Slack webhook URL, or webhook URL
monitor_idstring | nullNoMonitor UUID, or null for all monitors (default: null)
severity_filterstring[]NoArray of "critical" | "warning" | "info" (default: all)

Example Request

curl -X POST https://apidrift.com/api/alerts \
  --cookie "<your-session-cookie>" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "slack",
    "destination": "https://hooks.slack.com/services/T00/B00/xxx",
    "severity_filter": ["critical", "warning"]
  }'

Response

{
  "alert": {
    "id": "alert-uuid",
    "user_id": "user-uuid",
    "monitor_id": null,
    "channel": "slack",
    "destination": "https://hooks.slack.com/services/T00/B00/xxx",
    "severity_filter": ["critical", "warning"],
    "is_active": true,
    "created_at": "2026-03-18T12:00:00Z"
  }
}
PATCH/api/alerts/:id

Update an alert configuration. At least one field must be provided.

Parameters

ParameterTypeRequiredDescription
is_activebooleanNoEnable or disable the alert
destinationstringNoUpdated destination
severity_filterstring[]NoArray of "critical" | "warning" | "info"

Example Request

curl -X PATCH https://apidrift.com/api/alerts/alert-uuid \
  --cookie "<your-session-cookie>" \
  -H "Content-Type: application/json" \
  -d '{"is_active": false, "severity_filter": ["critical"]}'

Response

{
  "alert": {
    "id": "alert-uuid",
    "user_id": "user-uuid",
    "monitor_id": null,
    "channel": "slack",
    "destination": "https://hooks.slack.com/services/T00/B00/xxx",
    "severity_filter": ["critical"],
    "is_active": false,
    "created_at": "2026-03-10T08:00:00Z"
  }
}
DELETE/api/alerts/:id

Delete an alert configuration.

Example Request

curl -X DELETE https://apidrift.com/api/alerts/alert-uuid \
  --cookie "<your-session-cookie>"

Response

{
  "success": true
}

Webhooks

When a change is detected and you have a webhook alert configured, APIDrift sends a POST request to your destination URL with the following payload.

Payload Format

{
  "event": "change.detected",
  "monitor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Stripe API",
    "url": "https://api.stripe.com/openapi/spec",
    "type": "openapi"
  },
  "changes": [
    {
      "change_type": "breaking",
      "severity": "critical",
      "summary": "Removed endpoint POST /v1/charges",
      "diff": "- POST /v1/charges\n+ (removed)",
      "detected_at": "2026-03-17T15:00:00Z"
    }
  ]
}

Severity Examples

critical

{
  "change_type": "breaking",
  "severity": "critical",
  "summary": "Removed endpoint POST /v1/charges",
  "diff": "- POST /v1/charges\n+ (removed)",
  "detected_at": "2026-03-17T15:00:00Z"
}

warning

{
  "change_type": "deprecation",
  "severity": "warning",
  "summary": "Deprecated field 'source' on POST /v1/charges",
  "diff": "~ source: string (deprecated)",
  "detected_at": "2026-03-17T15:00:00Z"
}

info

{
  "change_type": "addition",
  "severity": "info",
  "summary": "Added endpoint GET /v1/billing/meters",
  "diff": "+ GET /v1/billing/meters",
  "detected_at": "2026-03-17T15:00:00Z"
}

GitHub Integration

Connect your GitHub repositories to enable Auto-Patch PR generation. APIDrift uses a GitHub App for secure repository access.

Installation

  1. Go to the Dashboard → Settings → GitHub
  2. Click Connect GitHub to install the APIDrift GitHub App
  3. Select the repositories you want APIDrift to access
  4. Authorize the app — you'll be redirected back to your dashboard

OAuth Callback

GET/api/github/callback

Handles the OAuth callback from GitHub after app installation. This endpoint is called automatically — you do not need to call it directly.

Connected Repositories

Once connected, manage your repositories from the Dashboard. APIDrift will scan connected repos for SDK usage patterns and generate Auto-Patch PRs when breaking changes are detected in your monitored APIs.

Rate Limits

Rate limits and resource quotas vary by plan.

PlanMonitorsMin IntervalAlert ConfigsAI Analyses/moMigration GuidesAuto-Patches/mo
Free324 hr100
Pro1560 min101000
Team5015 min5030010020

Exceeding your plan's limits returns 403 Forbidden with a descriptive error message.

Support Matrix

What APIDrift can and cannot do today. This page is kept honest — if something is not supported yet, it says so.

Monitoring Scope

FeatureStatusNote
OpenAPI spec monitoringSupportedJSON and YAML formats
Documentation page scrapingNot supported yet
Changelog / release notes parsingNot supported yet
GraphQL introspectionNot supported yet
gRPC / Protobuf schema trackingNot supported yet
Private / authenticated API specsNot supported yetPublic URLs only

Supported Languages

Auto-patch PR generation currently targets the following languages and runtimes.

LanguageAuto-PatchNote
TypeScriptSupportedNode.js runtime
JavaScriptSupportedNode.js runtime
PythonNot supported yet
GoNot supported yet
Java / KotlinNot supported yet
RubyNot supported yet
RustNot supported yet
C# / .NETNot supported yet
PHPNot supported yet

Patch Capabilities

Auto-patch creates draft PRs with suggested code changes. Every patch requires human review before merging.

Can do

  • Type definition updates (interfaces, types, schemas)
  • API client method signature changes
  • Import path and module reference updates
  • Request/response payload shape adjustments
  • SDK version bump suggestions

Cannot do

  • Business logic changes
  • Database schema migrations
  • Multi-service orchestration rewrites
  • Authentication flow changes
  • Custom middleware or interceptor updates

Known Limitations

AI accuracy

Impact analysis and patches are best-effort, not guaranteed. Always review AI-generated output before acting on it.

Repository structure

Monorepos are partially supported. Complex workspace configurations (Nx, Turborepo with custom pipelines) may produce incomplete patches.

Check intervals

Minimum check interval depends on your plan. Free tier checks once per day; Team tier checks as frequently as every 15 minutes.

Spec size

Very large OpenAPI specs (>10 MB) may time out during diff computation. Split large specs into smaller service-level specs if possible.

Notification delivery

Webhook and Slack notifications are fire-and-forget. Transient failures are not retried.