> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diversion.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List collaborators

> Get all collaborators and pending invites for repo



## OpenAPI

````yaml get /repos/{repo_id}/collaborators
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/{repo_id}/collaborators:
    parameters:
      - $ref: '#/components/parameters/RepoParam'
    get:
      tags:
        - Collaborators
      description: Get all collaborators and pending invites for repo
      operationId: src.handlers.collaboration.list_collaborators
      responses:
        '200':
          $ref: '#/components/responses/CollaboratorsList'
      security:
        - OAuth2:
            - coreapi/read
components:
  parameters:
    RepoParam:
      in: path
      name: repo_id
      required: true
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
      description: >-
        The repo ID of the repository. Repo _name_ can be used instead of the
        ID, but usage of ID for permanent linking and API requests is preferred.
  responses:
    CollaboratorsList:
      description: A list of collaborators and pending invites
      content:
        application/json:
          schema:
            type: object
            properties:
              collaborators:
                type: array
                items:
                  $ref: '#/components/schemas/Collaborator'
              invites:
                type: array
                items:
                  $ref: '#/components/schemas/CollaborationInvite'
  schemas:
    Collaborator:
      type: object
      properties:
        collaboration_id:
          type: string
        user_id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        access_mode:
          $ref: '#/components/schemas/AccessMode'
      required:
        - collaboration_id
        - user_id
        - access_mode
    CollaborationInvite:
      type: object
      properties:
        invite_id:
          type: integer
          example: 17
        inviting_user_id:
          type: string
        invited_email:
          type: string
          format: email
        access_mode:
          $ref: '#/components/schemas/AccessMode'
        created:
          type: string
          format: date-time
        expires:
          type: string
          format: date-time
      required:
        - invite_id
        - inviting_user_id
        - invited_email
        - access_mode
        - created
        - expires
    AccessMode:
      type: string
      enum:
        - READ
        - WRITE
        - ADMIN
        - OWNER
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````