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

# Patch authchange password

> Change password



## OpenAPI

````yaml /swagger.json patch /auth/change-password
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:
  /auth/change-password:
    patch:
      tags:
        - auth
      description: Change password
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  minLength: 8
                  description: Minimum 8 chars
                newPassword:
                  type: string
                  minLength: 8
                  pattern: ^(?=.*[A-Z])(?=.*\d).{8,}$/i
              required:
                - password
                - newPassword
      responses:
        '201':
          description: Change password successfully
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://app.teable.ai/api/auth/change-password \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"stringst","newPassword":"stringst"}'
        - lang: JavaScript
          source: |-
            const url = 'https://app.teable.ai/api/auth/change-password';
            const options = {
              method: 'PATCH',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"password":"stringst","newPassword":"stringst"}'
            };

            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: 'PATCH',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/auth/change-password',
              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({password: 'stringst', newPassword:
            'stringst'}));

            req.end();
        - lang: Python
          source: |-
            import http.client

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

            payload = "{\"password\":\"stringst\",\"newPassword\":\"stringst\"}"

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

            conn.request("PATCH", "/api/auth/change-password", payload, headers)

            res = conn.getresponse()
            data = res.read()

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

````