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

# List account invitations

> List all account invitations



## OpenAPI

````yaml get /account-invitations
openapi: 3.1.0
info:
  title: CookieChimp API
  description: API for CookieChimp.com
  version: 1.0.1
servers:
  - url: https://cookiechimp.com/api/v1
security:
  - authorization: []
paths:
  /account-invitations:
    get:
      tags:
        - Account Invitations
      summary: List account invitations
      description: List all account invitations
      operationId: listAccountInvitations
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/order'
      responses:
        '200':
          description: List of account invitations
          content:
            application/json:
              schema:
                type: object
                properties:
                  pagination:
                    $ref: '#/components/schemas/AccountInvitationPagination'
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountInvitation'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    limit:
      name: limit
      in: query
      description: Number of resources to return
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    offset:
      name: offset
      in: query
      description: Number of resources to skip
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
    sort:
      name: sort
      in: query
      description: Field to sort by
      required: false
      schema:
        type: string
    order:
      name: order
      in: query
      description: Sort order
      required: false
      schema:
        type: string
        enum:
          - asc
          - desc
  schemas:
    AccountInvitationPagination:
      allOf:
        - $ref: '#/components/schemas/BasePagination'
      example:
        prev_url: /api/v1/account-invitations?page=
        next_url: /api/v1/account-invitations?page=2
        count: 4
        page: 1
        prev: null
        next: 2
    AccountInvitation:
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountInvitationCreate'
      properties:
        id:
          type: string
        email:
          type: string
          format: email
          description: Email address of the user
        invited_by_type:
          type: string
          description: Type of entity that created the invitation (account_user or API)
        invited_by_id:
          type: string
          nullable: true
          description: ID of the user who created the invitation
        created_at:
          type: string
          format: date-time
          description: Date and time when the invitation was created
        updated_at:
          type: string
          format: date-time
          description: Date and time when the invitation was last updated
        deleted_at:
          type: string
          format: date-time
          description: Date and time when the invitation was cancelled
      example:
        id: inv123
        email: newmember@cookiechimp.com
        role: member
        invited_by_type: API
        created_at: '2023-01-25T09:30:20Z'
        updated_at: '2023-01-25T09:30:20Z'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
      example:
        error:
          code: 400
          message: Invalid request
    BasePagination:
      type: object
      properties:
        prev_url:
          type: string
          description: Path to get previous page
        next_url:
          type: string
          description: Path to get next page
        count:
          type: integer
          description: Total number of pages
        page:
          type: integer
          description: Current page
        prev:
          type: integer
          description: Previous page number
        next:
          type: integer
          description: Next page number
    AccountInvitationCreate:
      type: object
      properties:
        name:
          type: string
          description: Name of the user the invitation is for
        email:
          type: string
          format: email
          description: Email address of the user
        role:
          type: string
          enum:
            - admin
            - member
          description: Role of the user when they accept the invitation
      required:
        - name
        - email
        - role
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      description: API token obtained from the login endpoint or the dashboard

````