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

# List pending invites for a tenant

> Returns all pending invites for a given tenant, accessible by authenticated members of the tenant.



## OpenAPI

````yaml https://us-west-2.api.thenile.dev/v2/openapi get /v2/databases/{database}/tenants/{tenantId}/invites
openapi: 3.0.0
info:
  title: Nile auth API
  version: '0.1'
servers: []
security: []
tags: []
paths:
  /v2/databases/{database}/tenants/{tenantId}/invites:
    get:
      tags:
        - tenants
      summary: List pending invites for a tenant
      description: >-
        Returns all pending invites for a given tenant, accessible by
        authenticated members of the tenant.
      operationId: listTenantInvites
      parameters:
        - name: database
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of pending invites
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    tenant_id:
                      type: string
                      format: uuid
                    token:
                      type: string
                      description: Hashed invite token
                    identifier:
                      type: string
                      format: email
                    roles:
                      type: array
                      items:
                        type: string
                      nullable: true
                    created_by:
                      type: string
                      format: uuid
                      description: ID of the user who sent the invite
                    expires:
                      type: string
                      format: date-time
              example:
                - id: bd371f92-03e1-4862-9f6b-6d96d392ff18
                  tenant_id: 019731dc-2462-7615-8dc3-c9fd85e61966
                  token: >-
                    0007afb8bf432f8729491e1af35f03d111eb9a8105c0e9c3eebd8ca31585aed3
                  identifier: joseph@thenile.dev
                  roles: null
                  created_by: 019731dc-2440-7fd2-88b6-b233cc0e2695
                  expires: '2025-06-02T22:16:40.535Z'
        '400':
          description: Bad request (e.g. missing tenantId or SQL failure)
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: No invites found
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                type: string
      security:
        - sessionCookie: []
components:
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: nile-auth.session-token
      description: >-
        Session token stored in a cookie after user signs in, prefixed with
        __Secure if on https

````