> ## 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 pending repo invites

> Retrieves all pending repository collaboration invitations for the current user based on their email address.

**Filtering:**
Returns non-expired invitations with optional status filtering (defaults to PENDING).

**Each invite includes:**
- Repository name
- Organization (if applicable)
- Inviting user details
- Access mode
- Expiration time

**Use case:**
Used by clients to display pending invitations requiring user action.




## OpenAPI

````yaml get /repos/invites
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/invites:
    get:
      tags:
        - Repository Management
      summary: List pending repo invites
      description: >
        Retrieves all pending repository collaboration invitations for the
        current user based on their email address.


        **Filtering:**

        Returns non-expired invitations with optional status filtering (defaults
        to PENDING).


        **Each invite includes:**

        - Repository name

        - Organization (if applicable)

        - Inviting user details

        - Access mode

        - Expiration time


        **Use case:**

        Used by clients to display pending invitations requiring user action.
      operationId: src.handlersv2.invites.get_repository_invites
      parameters:
        - in: query
          name: status
          description: Filter invites by status
          schema:
            $ref: '#/components/schemas/InviteStatus'
      responses:
        '200':
          description: Repository invites returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoInviteList'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/read
components:
  schemas:
    InviteStatus:
      type: string
      enum:
        - PENDING
        - ACCEPTED
        - REJECTED
        - CANCELED
    RepoInviteList:
      type: object
      properties:
        invites:
          type: array
          items:
            $ref: '#/components/schemas/RepoInvite'
      required:
        - invites
    RepoInvite:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the repository invite
          example: 123456
        repo_id:
          type: string
          description: ID of the repository
          example: repo_123456
        repo_name:
          type: string
          description: Name of the repository
          example: Great Repository
        inviting_user_name:
          type: string
          description: Name of the user who is inviting to the repository
          example: John Doe
        organization_name:
          type: string
          description: Name of the organization
          example: Great Organization
        mode:
          $ref: '#/components/schemas/AccessMode'
        created:
          type: string
          format: date-time
          description: Date and time when the invite was created
          example: '2023-01-01T00:00:00Z'
        expires:
          type: string
          format: date-time
          description: Date and time when the invite expires
          example: '2023-01-31T00:00:00Z'
        status:
          $ref: '#/components/schemas/InviteStatus'
      required:
        - id
        - repo_id
        - repo_name
        - inviting_user_name
        - mode
        - created
        - expires
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        detail:
          type: string
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
    AccessMode:
      type: string
      enum:
        - READ
        - WRITE
        - ADMIN
        - OWNER
  responses:
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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

````