> ## 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 org invites

> Retrieves all pending organization invitations for the current user based on their email address. Only returns non-expired invitations with optional status filtering (defaults to PENDING). Each invite includes organization details, inviting user information, role assignment, and expiration time. Invitations are automatically sent to the user's registered email address.




## OpenAPI

````yaml get /organizations/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:
  /organizations/invites:
    get:
      tags:
        - Organization Management
      summary: List pending org invites
      description: >
        Retrieves all pending organization invitations for the current user
        based on their email address. Only returns non-expired invitations with
        optional status filtering (defaults to PENDING). Each invite includes
        organization details, inviting user information, role assignment, and
        expiration time. Invitations are automatically sent to the user's
        registered email address.
      operationId: src.handlersv2.organization.get_organization_invites
      parameters:
        - in: query
          name: status
          description: Filter invites by status
          schema:
            type: string
            enum:
              - PENDING
              - ACCEPTED
              - REJECTED
              - CANCELED
            default: PENDING
      responses:
        '200':
          description: Organization invites returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInviteList'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/read
components:
  schemas:
    OrganizationInviteList:
      type: object
      properties:
        invites:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationInvite'
      required:
        - invites
    OrganizationInvite:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the organization invite
          example: 123456
        organization_id:
          type: string
          description: ID of the organization
          example: org_123456
        organization_name:
          type: string
          description: Name of the organization
          example: Great Organization
        inviting_user_id:
          type: string
          description: ID of the user who is inviting to the organization
          example: user_123456
        inviting_user_name:
          type: string
          description: Name of the user who is inviting to the organization
          example: John Doe
        invited_email:
          type: string
          format: email
          description: Email of the user who is invited to the organization
          example: john.doe@example.com
        role:
          $ref: '#/components/schemas/AccessMode'
        status:
          $ref: '#/components/schemas/InviteStatus'
        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'
    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
    InviteStatus:
      type: string
      enum:
        - PENDING
        - ACCEPTED
        - REJECTED
        - CANCELED
  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

````