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

# update a tenant

> updates a tenant in the database



## OpenAPI

````yaml https://us-west-2.api.thenile.dev/v2/openapi put /v2/databases/{database}/tenants/{tenantId}
openapi: 3.0.0
info:
  title: Nile auth API
  version: '0.1'
servers: []
security: []
tags: []
paths:
  /v2/databases/{database}/tenants/{tenantId}:
    put:
      tags:
        - tenants
      summary: update a tenant
      description: updates a tenant in the database
      operationId: updateTenant
      parameters:
        - name: database
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: Tenant values to be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTenant'
            examples:
              Rename tenant:
                summary: Renames the tenant
                description: Tenant Request
                value:
                  name: New tenant name
      responses:
        '201':
          description: update an existing tenant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTenant'
        '400':
          description: API/Database failures
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not found
          content: {}
      security:
        - sessionCookie: []
components:
  schemas:
    UpdateTenant:
      type: object
      properties:
        name:
          type: string
  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

````