Corridor Teams API

Manage team configuration, members, and permissions.

OpenAPI Specification

corridor-teams-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Corridor Dashboard Teams API
  version: '1.0'
  summary: Programmatic access to Corridor findings, guardrails, PR reviews, team settings, and dashboard data.
  description: 'Corridor exposes a REST API for integrating its AI-coding security platform with CI/CD pipelines, custom dashboards, and other tools. All endpoints are authenticated with API tokens (the `cor_` prefix) passed as an `Authorization: Bearer` header. API tokens carry the same access as the user who created them and cannot perform admin operations (those require a user session). This specification was faithfully generated by the API Evangelist enrichment pipeline from Corridor''s published API reference; it is not a verbatim provider-published machine-readable spec.'
  contact:
    name: Corridor Support
    email: support@corridor.dev
    url: https://docs.corridor.dev/api/reference
  x-apievangelist-generated: '2026-07-18'
  x-apievangelist-method: generated
  x-apievangelist-source: https://docs.corridor.dev/api/reference
servers:
- url: https://app.corridor.dev/api
  description: Corridor production API
security:
- bearerAuth: []
tags:
- name: Teams
  description: Manage team configuration, members, and permissions.
paths:
  /teams:
    get:
      operationId: listTeams
      tags:
      - Teams
      summary: List teams
      description: Returns all teams the authenticated user belongs to.
      responses:
        '200':
          description: Teams.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Team'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /teams/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    get:
      operationId: getTeam
      tags:
      - Teams
      summary: Get team
      responses:
        '200':
          description: The team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /teams/{id}/permissions:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    get:
      operationId: getTeamPermissions
      tags:
      - Teams
      summary: Get team permissions
      description: Returns the current user's role and permissions for the team.
      responses:
        '200':
          description: Role and permissions.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /teams/{id}/invite:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    post:
      operationId: inviteUser
      tags:
      - Teams
      summary: Invite a user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  type: string
                  format: email
                role:
                  type: string
                  enum:
                  - admin
                  - member
                  - ideUser
                  default: ideUser
      responses:
        '200':
          description: Invitation sent.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /teams/{teamId}/users/{userId}:
    parameters:
    - name: teamId
      in: path
      required: true
      schema:
        type: string
    - name: userId
      in: path
      required: true
      schema:
        type: string
    delete:
      operationId: removeUser
      tags:
      - Teams
      summary: Remove a user
      responses:
        '200':
          description: User removed.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    Forbidden:
      description: Forbidden — insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized — invalid or missing token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request — check your parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Team:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: Description of what went wrong.
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API token with the `cor_` prefix, generated from Profile > API Tokens in the Corridor dashboard. Passed as `Authorization: Bearer cor_...`.'