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

# Update db table name

> Update the physical database table name. Must be 1-63 characters, start with letter or underscore, contain only letters, numbers and underscore, and be unique within the base.



## OpenAPI

````yaml /swagger.json put /base/{baseId}/table/{tableId}/db-table-name
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
paths:
  /base/{baseId}/table/{tableId}/db-table-name:
    put:
      tags:
        - table
      summary: Update db table name
      description: >-
        Update the physical database table name. Must be 1-63 characters, start
        with letter or underscore, contain only letters, numbers and underscore,
        and be unique within the base.
      parameters:
        - schema:
            type: string
          required: true
          name: baseId
          in: path
        - schema:
            type: string
          required: true
          name: tableId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dbTableName:
                  type: string
                  minLength: 1
                  pattern: ^[a-z_]\w{0,62}$/i
                  description: >-
                    table name in backend database. Limitation: 1-63 characters,
                    start with letter or underscore, can only contain letters,
                    numbers and underscore, case sensitive, cannot be duplicated
                    with existing table name in the base.
              required:
                - dbTableName
      responses:
        '200':
          description: Database table name successfully updated.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PUT \
              --url https://app.teable.ai/api/base/%7BbaseId%7D/table/%7BtableId%7D/db-table-name \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"dbTableName":"string"}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/base/%7BbaseId%7D/table/%7BtableId%7D/db-table-name';

            const options = {
              method: 'PUT',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"dbTableName":"string"}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'PUT',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/base/%7BbaseId%7D/table/%7BtableId%7D/db-table-name',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({dbTableName: 'string'}));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload = "{\"dbTableName\":\"string\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PUT",
            "/api/base/%7BbaseId%7D/table/%7BtableId%7D/db-table-name", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````