> ## 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.

# Accepts a tenant invite

> Accepts an invite for a user to join a tenant using the token and email. The invite must be valid and not expired.



## OpenAPI

````yaml https://us-west-2.api.thenile.dev/v2/openapi put /v2/databases/{database}/tenants/{tenantId}/invite
openapi: 3.0.0
info:
  title: Nile auth API
  version: '0.1'
servers: []
security: []
tags: []
paths:
  /v2/databases/{database}/tenants/{tenantId}/invite:
    put:
      tags:
        - tenants
      summary: Accepts a tenant invite
      description: >-
        Accepts an invite for a user to join a tenant using the token and email.
        The invite must be valid and not expired.
      operationId: acceptTenantInvite
      parameters:
        - name: database
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - identifier
                - token
                - callbackUrl
              properties:
                identifier:
                  type: string
                  format: email
                token:
                  type: string
                callbackUrl:
                  type: string
                  format: uri
      responses:
        '201':
          description: Successfully created the user and accepted the invite
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  email:
                    type: string
                  name:
                    type: string
                    nullable: true
                  familyName:
                    type: string
                    nullable: true
                  givenName:
                    type: string
                    nullable: true
                  picture:
                    type: string
                    format: uri
                    nullable: true
                  created:
                    type: string
                    format: date-time
                  updated:
                    type: string
                    format: date-time
                  emailVerified:
                    type: string
                    format: date-time
        '400':
          description: >-
            Missing or invalid data (e.g., invalid token, malformed email, bad
            callback URL)
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: Inviter is no longer a member of the tenant
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Invite not found
          content:
            text/plain:
              schema:
                type: string
        '410':
          description: Invite has expired
          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

````