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

# List invites

> Retrieve a list of invites in a workspace.



## OpenAPI

````yaml get /workspaces/{workspaceId}/invites
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /workspaces/{workspaceId}/invites:
    get:
      summary: Retrieve a list of invites in a workspace.
      description: Retrieve a list of invites in a workspace.
      operationId: getInvitesByWorkspace
      parameters:
        - $ref: '#/components/parameters/workspaceId'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/perPage'
      responses:
        '200':
          description: Status OK.
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invite'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()
            client.workspaces.invites.list(
              workspace_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            )
        - lang: typescript
          source: |
            import Openlayer from 'openlayer';

            const openlayer = new Openlayer();
            await openlayer.workspaces.invites.list(
              {workspaceId: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}
            )
        - lang: go
          source: >
            package main


            import (
              "context"

              "github.com/openlayer-ai/openlayer-go"
              "github.com/openlayer-ai/openlayer-go/option"
            )


            client := openlayer.NewClient()

            client.Workspaces.Invites.List(context.TODO(),
            "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
        - lang: java
          source: >
            import com.openlayer.api.client.OpenlayerClient;

            import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;

            import com.openlayer.api.models.WorkspaceInvitesListParams;

            import com.openlayer.api.models.WorkspaceInvitesListResponse;


            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();


            WorkspaceInvitesListParams params =
            WorkspaceInvitesListParams.builder().build();

            WorkspaceInvitesListResponse response =
            client.workspaces().invites().list(params);
        - lang: curl
          source: |
            curl --request GET \
              --url https://api.openlayer.com/v1/workspaces/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/invites \
              --header 'Authorization: Bearer <token>'
components:
  parameters:
    workspaceId:
      name: workspaceId
      in: path
      description: The workspace id.
      required: true
      schema:
        type: string
        format: uuid
    page:
      name: page
      in: query
      description: The page to return in a paginated query.
      schema:
        type: integer
        minimum: 1
        default: 1
    perPage:
      name: perPage
      in: query
      description: Maximum number of items to return per page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
  schemas:
    Invite:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The invite id.
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The invite creation date.
        creator:
          type: object
          properties:
            id:
              type: string
              format: uuid
              readOnly: true
              description: The invite creator id.
            username:
              type: string
              nullable: true
              maxLength: 64
              example: user123
              description: The invite creator username.
            name:
              type: string
              nullable: true
              maxLength: 120
              example: Rishab Ramanathan
              description: The invite creator name.
        status:
          type: string
          enum:
            - accepted
            - pending
          description: The invite status.
        workspace:
          type: object
          readOnly: true
          required:
            - id
            - name
            - slug
            - dateCreated
            - memberCount
          properties:
            id:
              type: string
              format: uuid
              readOnly: true
            name:
              type: string
              maxLength: 20
              example: Openlayer
            slug:
              type: string
              maxLength: 20
              example: openlayer
              pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
            dateCreated:
              type: string
              format: date-time
              readOnly: true
            memberCount:
              type: integer
              minimum: 0
              readOnly: true
        email:
          type: string
          format: email
          maxLength: 120
          example: user@email.com
          description: The invite email.
        role:
          type: string
          enum:
            - ADMIN
            - MEMBER
            - VIEWER
          description: The invite role.
      required:
        - id
        - dateCreated
        - creator
        - status
        - workspace
        - email
        - role
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````