# List all invitations

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/workspaces/invitations:
    get:
      summary: List all invitations
      deprecated: false
      description: List all workspace invitations (pending, accepted, rejected, revoked)
      tags:
        - workspaces
      parameters:
        - name: limit
          in: query
          description: ''
          required: true
          example: '10'
          schema:
            type: string
        - name: page
          in: query
          description: ''
          required: true
          example: '1'
          schema:
            type: string
        - name: status
          in: query
          description: ''
          required: true
          example: PENDING
          schema:
            type: string
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: YOUR_API_KEY
          schema:
            type: string
        - name: x-workspace-key
          in: header
          description: ''
          required: false
          example: workspace_id
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      page:
                        type: integer
                      limit:
                        type: integer
                      totalCount:
                        type: integer
                      totalPages:
                        type: integer
                      invitations:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            workspaceId:
                              type: string
                            workspaceName:
                              type: string
                            inviteeEmail:
                              type: string
                            role:
                              type: string
                            status:
                              type: string
                            expiresAt:
                              type: string
                            acceptedAt:
                              type: 'null'
                            sender:
                              type: object
                              properties:
                                email:
                                  type: string
                                firstName:
                                  type: string
                                lastName:
                                  type: string
                              required:
                                - email
                                - firstName
                                - lastName
                              x-apidog-orders:
                                - email
                                - firstName
                                - lastName
                          x-apidog-orders:
                            - id
                            - workspaceId
                            - workspaceName
                            - inviteeEmail
                            - role
                            - status
                            - expiresAt
                            - acceptedAt
                            - sender
                    required:
                      - page
                      - limit
                      - totalCount
                      - totalPages
                      - invitations
                    x-apidog-orders:
                      - page
                      - limit
                      - totalCount
                      - totalPages
                      - invitations
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: Invitations fetched successfully
                data:
                  page: 1
                  limit: 10
                  totalCount: 5
                  totalPages: 1
                  invitations:
                    - id: invitation_uuid
                      workspaceId: workspace_uuid
                      workspaceName: My Workspace
                      inviteeEmail: user@example.com
                      role: EDITOR
                      status: PENDING
                      expiresAt: '2026-01-17T10:30:00Z'
                      acceptedAt: null
                      sender:
                        email: owner@example.com
                        firstName: Owner
                        lastName: User
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: workspaces
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-26777875-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
