> ## 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 base share

> Update a base share link



## OpenAPI

````yaml /swagger.json patch /base/{baseId}/share/{shareId}
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}/share/{shareId}:
    patch:
      tags:
        - base-share
      description: Update a base share link
      parameters:
        - schema:
            type: string
          required: true
          name: baseId
          in: path
        - schema:
            type: string
          required: true
          name: shareId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                allowSave:
                  type: boolean
                  nullable: true
                allowCopy:
                  type: boolean
                  nullable: true
                enabled:
                  type: boolean
                password:
                  type: string
                  nullable: true
                  minLength: 3
      responses:
        '200':
          description: Returns the updated base share
          content:
            application/json:
              schema:
                type: object
                properties:
                  baseId:
                    type: string
                  shareId:
                    type: string
                  password:
                    type: boolean
                  nodeId:
                    type: string
                  allowSave:
                    type: boolean
                    nullable: true
                  allowCopy:
                    type: boolean
                    nullable: true
                  enabled:
                    type: boolean
                required:
                  - baseId
                  - shareId
                  - password
                  - nodeId
                  - allowSave
                  - allowCopy
                  - enabled
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://app.teable.ai/api/base/%7BbaseId%7D/share/%7BshareId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"allowSave":true,"allowCopy":true,"enabled":true,"password":"string"}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/base/%7BbaseId%7D/share/%7BshareId%7D';

            const options = {
              method: 'PATCH',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"allowSave":true,"allowCopy":true,"enabled":true,"password":"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: 'PATCH',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/base/%7BbaseId%7D/share/%7BshareId%7D',
              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({allowSave: true, allowCopy: true, enabled:
            true, password: 'string'}));

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


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


            payload =
            "{\"allowSave\":true,\"allowCopy\":true,\"enabled\":true,\"password\":\"string\"}"


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


            conn.request("PATCH", "/api/base/%7BbaseId%7D/share/%7BshareId%7D",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


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

````