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

# List organization invitations

> Retrieve a paginated list of organization invitations.

By default, only shows **pending** invitations. Use the `status` parameter
to filter by different statuses or see historical invitations.




## OpenAPI

````yaml /openapi.yaml get /admin/invitations
openapi: 3.1.0
info:
  title: AsterAgents API
  version: 1.0.0
  description: >
    API for AsterAgents platform operations.


    - **Admin endpoints** (`/admin/*`) require organization admin privileges
    (`org:admin` role)

    - **Agent endpoints** (`/agents`) require agent management permissions or
    `org:admin` role

    - **Knowledge base endpoints** (`/kb/*`) require standard authentication

    - **Skills endpoints** (`/skills/*`) require standard authentication

    - **File endpoints** (`/upload/*`, `/kb/files`, `/skills/files`) require
    standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://asteragents.com/api
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Manage active organization users
  - name: Invitations
    description: Manage organization invitations
  - name: Files
    description: Upload and manage files
  - name: Knowledge Bases
    description: Manage knowledge bases and their files
  - name: Knowledge Base Management
    description: Create, update, and delete knowledge bases
  - name: Agents
    description: Create, update, and delete agents
  - name: Agent Tags
    description: Organize agents with tags
  - name: Tools
    description: Discover the tool catalog available to your organization
  - name: Skills
    description: Manage agent skills
  - name: Skill Files
    description: Manage bundled files for skills
  - name: Conversations
    description: Invoke agents and retrieve conversation history and messages
  - name: Scheduled Tasks
    description: Schedule agents to run automatically on a cron schedule
paths:
  /admin/invitations:
    get:
      tags:
        - Invitations
      summary: List organization invitations
      description: >
        Retrieve a paginated list of organization invitations.


        By default, only shows **pending** invitations. Use the `status`
        parameter

        to filter by different statuses or see historical invitations.
      operationId: listInvitations
      parameters:
        - name: limit
          in: query
          description: Number of results to return
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
        - name: offset
          in: query
          description: Number of results to skip for pagination
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: status
          in: query
          description: Comma-separated list of statuses to filter by
          schema:
            type: string
            default: pending
          examples:
            pending:
              value: pending
              summary: Only pending invitations
            multiple:
              value: pending,accepted
              summary: Pending and accepted invitations
            all:
              value: pending,accepted,revoked,expired
              summary: All invitations
      responses:
        '200':
          description: Successfully retrieved invitations
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - totalCount
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invitation'
                  totalCount:
                    type: integer
                    description: Total number of invitations matching the filter
              examples:
                success:
                  value:
                    data:
                      - id: orginv_2ABC123DEF
                        emailAddress: newuser@company.com
                        role: org:member
                        status: pending
                        publicMetadata:
                          department: sales
                        createdAt: 1705363800000
                        updatedAt: 1705363800000
                      - id: orginv_2XYZ789GHI
                        emailAddress: admin@company.com
                        role: org:admin
                        status: pending
                        publicMetadata: null
                        createdAt: 1705276800000
                        updatedAt: 1705276800000
                    totalCount: 2
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Invitation:
      type: object
      required:
        - id
        - emailAddress
        - role
        - status
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          description: Unique invitation identifier
          example: orginv_2ABC123DEF
        emailAddress:
          type: string
          format: email
          description: Email address the invitation was sent to
          example: newuser@company.com
        role:
          type: string
          description: Role the user will have when they accept
          enum:
            - org:admin
            - org:member
          example: org:member
        status:
          type: string
          description: Current invitation status
          enum:
            - pending
            - accepted
            - revoked
            - expired
          example: pending
        publicMetadata:
          type: object
          nullable: true
          description: Metadata applied to user when they accept
          additionalProperties: true
          example:
            department: sales
        createdAt:
          type: integer
          format: int64
          description: Unix timestamp (milliseconds) when invitation was created
          example: 1705363800000
        updatedAt:
          type: integer
          format: int64
          description: Unix timestamp (milliseconds) when invitation was last updated
          example: 1705363800000
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Bad Request
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    BadRequest:
      description: Bad Request - Invalid parameters or user not part of organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: User is not part of any organization
    Forbidden:
      description: Forbidden - User is not an admin in the organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Unauthorized: User is not an admin in this organization'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication.

        Must be from a user with `org:admin` role.

````