Skip to main content
Corridor exposes a REST API that you can use to integrate with CI/CD pipelines, custom dashboards, or other tools. All endpoints are available via API tokens.

Authentication

Include your API token in the Authorization header:
curl -H "Authorization: Bearer cor_your_token_here" \
  https://app.corridor.dev/api/teams
You can generate API tokens from Profile > API Tokens in the Corridor dashboard. Tokens use the cor_ prefix and have the same access as the user who created them.
API tokens cannot perform admin operations. Those require a standard user session.

Base URL

https://app.corridor.dev/api
All paths below are relative to this base URL.

Findings

Retrieve and manage security findings across your projects.

Search findings

GET /findings/search
ParameterTypeRequiredDescription
teamIdstringYesTeam ID to search within
searchstringNoSearch term (matches title, file path, or CWE)
statestringNoFilter by state: open, closed, or potential
limitnumberNoMax results (default 10, max 50)
curl -H "Authorization: Bearer cor_..." \
  "https://app.corridor.dev/api/findings/search?teamId=TEAM_ID&state=open&limit=20"
Response:
[
  {
    "id": "finding-uuid",
    "title": "SQL Injection in userController.ts",
    "affectedFile": "src/controllers/userController.ts",
    "cwe": "CWE-89",
    "severity": "critical",
    "state": "open",
    "createdAt": "2025-01-15T10:30:00Z",
    "projectId": "project-uuid",
    "projectName": "my-app"
  }
]

Get finding

GET /findings/:id
Returns the full finding with related project, rule, scan, and PR review data.
curl -H "Authorization: Bearer cor_..." \
  https://app.corridor.dev/api/findings/FINDING_ID

Update finding

PUT /findings/:id
FieldTypeDescription
statestringopen or closed
closedReasonstringReason for closing
closedReasonCategorystringfalse_positive, risk_accepted, vulnerability_fixed, or other
severitystringcritical, high, medium, or low
titlestringUpdated title
descriptionstringUpdated description
cwestringCWE identifier
affectedFilestringFile path
All fields are optional. Include only the fields you want to update.
curl -X PUT -H "Authorization: Bearer cor_..." \
  -H "Content-Type: application/json" \
  -d '{"state": "closed", "closedReasonCategory": "false_positive", "closedReason": "Not exploitable in this context"}' \
  https://app.corridor.dev/api/findings/FINDING_ID

Delete finding

DELETE /findings/:id

Guardrails

Guardrails are security rules that Corridor enforces during code reviews and real-time analysis. They are managed per-project as “reports.”

List guardrails for a project

GET /projects/:id/reports
Returns all guardrails (reports) and rulesets attached to a project.
curl -H "Authorization: Bearer cor_..." \
  https://app.corridor.dev/api/projects/PROJECT_ID/reports
Response:
{
  "reports": [
    {
      "id": "report-uuid",
      "name": "SQL Injection Prevention",
      "guardrail": "Never use string concatenation for SQL queries...",
      "type": "guardrail",
      "createdAt": "2025-01-10T08:00:00Z"
    }
  ],
  "ruleset": []
}

Create a guardrail

POST /projects/:id/reports
FieldTypeRequiredDescription
namestringYesGuardrail name
guardrailstringYesThe guardrail rule text
typestringNoguardrail (default) or context
curl -X POST -H "Authorization: Bearer cor_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "No hardcoded secrets", "guardrail": "Never commit API keys, passwords, or secrets directly in source code. Use environment variables or a secrets manager."}' \
  https://app.corridor.dev/api/projects/PROJECT_ID/reports

Generate a guardrail with AI

POST /projects/:id/guardrails/generate
FieldTypeRequiredDescription
descriptionstringYesPlain-language description of the guardrail (max 1000 characters)
Returns a taskId you can use to track generation progress.
curl -X POST -H "Authorization: Bearer cor_..." \
  -H "Content-Type: application/json" \
  -d '{"description": "Prevent use of eval() and similar dynamic code execution functions"}' \
  https://app.corridor.dev/api/projects/PROJECT_ID/guardrails/generate

Update a guardrail

PUT /projects/:id/reports/:reportId
FieldTypeDescription
namestringUpdated name
guardrailstringUpdated rule text
typestringguardrail or context

Delete a guardrail

DELETE /projects/:id/reports/:reportId

List guardrail packs

GET /projects/:id/packs
Returns the security packs (curated guardrail collections) attached to a project.

PR Reviews

Access pull request review results and AI analysis.

List PR reviews

GET /teams/:id/pr-reviews
ParameterTypeDescription
limitnumberMax results
offsetnumberPagination offset
typestringFilter by review type
sortBystringSort field
sortOrderstringASC or DESC
curl -H "Authorization: Bearer cor_..." \
  "https://app.corridor.dev/api/teams/TEAM_ID/pr-reviews?limit=10&sortOrder=DESC"
Response:
{
  "data": [
    {
      "id": "pr-review-uuid",
      "title": "SQL Injection in userController.ts",
      "severity": "high",
      "state": "open",
      "affectedFile": "src/controllers/userController.ts",
      "createdAt": "2025-01-15T10:30:00Z",
      "cwe": "CWE-89",
      "prReview": { "id": "...", "github_pr_id": 123 },
      "project": { "id": "...", "name": "my-app" }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 42,
    "totalPages": 5,
    "hasNext": true,
    "hasPrev": false
  }
}

Get PR review

GET /teams/:id/pr-reviews/:prReviewId
Returns the full PR review including comments, findings, and metadata.

List PR review findings

GET /teams/:id/pr-review-findings
ParameterTypeDescription
prReviewIdstringFilter by specific PR review
limitnumberMax results
offsetnumberPagination offset

Team Settings

Manage team configuration, members, and preferences.

List teams

GET /teams
Returns all teams the authenticated user belongs to.

Get team

GET /teams/:id

Get team permissions

GET /teams/:id/permissions
Returns the current user’s role and permissions for the team.

Invite a user

POST /teams/:id/invite
FieldTypeRequiredDescription
emailstringYesEmail address to invite
rolestringNoadmin or member (default)

Remove a user

DELETE /teams/:teamId/users/:userId

Dashboard & Analytics

Access dashboard metrics and AI usage data.

Get dashboard data

GET /teams/:id/dashboard-data
Returns aggregated security metrics including findings by severity, trends over time, and top projects.
curl -H "Authorization: Bearer cor_..." \
  https://app.corridor.dev/api/teams/TEAM_ID/dashboard-data

List LLM requests

GET /teams/:id/list-requests
Returns a summary of AI/LLM requests made across the team, useful for tracking AI usage and compliance.

Get guardrail invocations

GET /teams/:id/guardrail-invocations-staging
ParameterTypeRequiredDescription
reportIdstringYesGuardrail report ID to get invocations for
periodstringNoTime period (default 7d)
projectIdstringNoFilter by project
limitnumberNoMax results (default 15)
offsetnumberNoPagination offset
Returns data on which guardrails were triggered during real-time code analysis (hook events and security checks).

Get stop hook invocations

GET /teams/:id/stop-hook-invocations
Returns instances where Corridor’s hooks blocked an action (e.g., prevented an insecure code pattern from being applied).

Log extension data

POST /log
The primary endpoint used by IDE extensions to send code analysis data to Corridor. Accepts a request body with a type field that determines processing:
TypeDescription
hook-eventReal-time hook events from IDE extensions
async-security-checkAsynchronous security analysis of code edits
fetch-security-resultsRetrieve cached security analysis results
mcp-detectionReport detected MCP servers
compliance-dataSubmit compliance telemetry
This endpoint is primarily used by the Corridor IDE extension. You typically don’t need to call it directly unless you’re building a custom integration.

Projects

List projects

GET /projects
ParameterTypeRequiredDescription
teamIdstringYesTeam ID to list projects for
Returns all projects for the specified team.

Get project

GET /projects/:id

Get project findings

GET /projects/:id/findings
Returns all findings for a specific project.

Error handling

All endpoints return standard HTTP status codes:
StatusMeaning
200Success
400Bad request — check your parameters
401Unauthorized — invalid or missing token
403Forbidden — insufficient permissions
404Not found
500Server error
Error responses include a JSON body:
{
  "error": "Description of what went wrong"
}

Rate limits

API tokens are subject to rate limiting. If you receive a 429 response, wait before retrying.

Next steps