> ## 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 space integration

> Update a integration to a space



## OpenAPI

````yaml /swagger.json patch /space/{spaceId}/integration/{integrationId}
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:
  /space/{spaceId}/integration/{integrationId}:
    patch:
      tags:
        - space
        - integration
      description: Update a integration to a space
      parameters:
        - schema:
            type: string
          required: true
          name: spaceId
          in: path
        - schema:
            type: string
          required: true
          name: integrationId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                enable:
                  type: boolean
                config:
                  type: object
                  properties:
                    llmProviders:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - openai
                              - anthropic
                              - google
                              - azure
                              - cohere
                              - mistral
                              - deepseek
                              - qwen
                              - zhipu
                              - lingyiwanwu
                              - xai
                              - togetherai
                              - ollama
                              - amazonBedrock
                              - openRouter
                              - openaiCompatible
                              - aiGateway
                          name:
                            type: string
                          apiKey:
                            type: string
                          baseUrl:
                            type: string
                            format: uri
                          models:
                            type: string
                            default: ''
                          isInstance:
                            type: boolean
                          modelConfigs:
                            type: object
                            additionalProperties:
                              type: object
                              properties:
                                label:
                                  type: string
                                pricing:
                                  type: object
                                  properties:
                                    input:
                                      type: string
                                    output:
                                      type: string
                                    inputCacheRead:
                                      type: string
                                    inputCacheWrite:
                                      type: string
                                    reasoning:
                                      type: string
                                    image:
                                      type: string
                                    webSearch:
                                      type: string
                                inputRate:
                                  type: number
                                  minimum: 0
                                outputRate:
                                  type: number
                                  minimum: 0
                                cacheReadRate:
                                  type: number
                                  minimum: 0
                                cacheWriteRate:
                                  type: number
                                  minimum: 0
                                reasoningRate:
                                  type: number
                                  minimum: 0
                                imageRate:
                                  type: number
                                  minimum: 0
                                webSearchRate:
                                  type: number
                                  minimum: 0
                                isImageModel:
                                  type: boolean
                                ability:
                                  type: object
                                  properties:
                                    image:
                                      anyOf:
                                        - type: boolean
                                        - type: object
                                          properties:
                                            url:
                                              type: boolean
                                            base64:
                                              type: boolean
                                    pdf:
                                      anyOf:
                                        - type: boolean
                                        - type: object
                                          properties:
                                            url:
                                              type: boolean
                                            base64:
                                              type: boolean
                                    webSearch:
                                      type: boolean
                                    toolCall:
                                      type: boolean
                                    reasoning:
                                      type: boolean
                                    imageGeneration:
                                      type: boolean
                                imageAbility:
                                  type: object
                                  properties:
                                    generation:
                                      type: boolean
                                    imageToImage:
                                      type: boolean
                                testedAt:
                                  type: number
                                ownedBy:
                                  type: string
                                  enum:
                                    - alibaba
                                    - amazon
                                    - anthropic
                                    - arcee-ai
                                    - bfl
                                    - bytedance
                                    - cohere
                                    - deepseek
                                    - google
                                    - inception
                                    - kwaipilot
                                    - meituan
                                    - meta
                                    - minimax
                                    - mistral
                                    - moonshotai
                                    - morph
                                    - nvidia
                                    - openai
                                    - perplexity
                                    - prime-intellect
                                    - stealth
                                    - vercel
                                    - voyage
                                    - xai
                                    - xiaomi
                                    - zai
                                modelType:
                                  type: string
                                  enum:
                                    - language
                                    - embedding
                                    - image
                                tags:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - reasoning
                                      - tool-use
                                      - vision
                                      - file-input
                                      - image-generation
                                      - implicit-caching
                                contextWindow:
                                  type: number
                                maxTokens:
                                  type: number
                                description:
                                  type: string
                        required:
                          - type
                          - name
                      default: []
                    embeddingModel:
                      type: string
                    translationModel:
                      type: string
                    chatModel:
                      type: object
                      properties:
                        lg:
                          type: string
                        md:
                          type: string
                        sm:
                          type: string
                        ability:
                          type: object
                          properties:
                            image:
                              anyOf:
                                - type: boolean
                                - type: object
                                  properties:
                                    url:
                                      type: boolean
                                    base64:
                                      type: boolean
                            pdf:
                              anyOf:
                                - type: boolean
                                - type: object
                                  properties:
                                    url:
                                      type: boolean
                                    base64:
                                      type: boolean
                            webSearch:
                              type: boolean
                            toolCall:
                              type: boolean
                            reasoning:
                              type: boolean
                            imageGeneration:
                              type: boolean
                    gatewayModels:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          label:
                            type: string
                          enabled:
                            type: boolean
                            default: true
                          capabilities:
                            type: object
                            properties:
                              image:
                                anyOf:
                                  - type: boolean
                                  - type: object
                                    properties:
                                      url:
                                        type: boolean
                                      base64:
                                        type: boolean
                              pdf:
                                anyOf:
                                  - type: boolean
                                  - type: object
                                    properties:
                                      url:
                                        type: boolean
                                      base64:
                                        type: boolean
                              webSearch:
                                type: boolean
                              toolCall:
                                type: boolean
                              reasoning:
                                type: boolean
                              imageGeneration:
                                type: boolean
                          pricing:
                            type: object
                            properties:
                              input:
                                type: string
                              output:
                                type: string
                              inputCacheRead:
                                type: string
                              inputCacheWrite:
                                type: string
                              reasoning:
                                type: string
                              image:
                                type: string
                              webSearch:
                                type: string
                          rates:
                            type: object
                            properties:
                              inputRate:
                                type: number
                                minimum: 0
                              outputRate:
                                type: number
                                minimum: 0
                              cacheReadRate:
                                type: number
                                minimum: 0
                              cacheWriteRate:
                                type: number
                                minimum: 0
                              reasoningRate:
                                type: number
                                minimum: 0
                              imageRate:
                                type: number
                                minimum: 0
                              webSearchRate:
                                type: number
                                minimum: 0
                          isImageModel:
                            type: boolean
                          defaultFor:
                            type: array
                            items:
                              type: string
                              enum:
                                - chatLg
                                - chatMd
                                - chatSm
                                - aiFieldText
                                - aiFieldImage
                          testedAt:
                            type: number
                          ownedBy:
                            type: string
                            enum:
                              - alibaba
                              - amazon
                              - anthropic
                              - arcee-ai
                              - bfl
                              - bytedance
                              - cohere
                              - deepseek
                              - google
                              - inception
                              - kwaipilot
                              - meituan
                              - meta
                              - minimax
                              - mistral
                              - moonshotai
                              - morph
                              - nvidia
                              - openai
                              - perplexity
                              - prime-intellect
                              - stealth
                              - vercel
                              - voyage
                              - xai
                              - xiaomi
                              - zai
                          modelType:
                            type: string
                            enum:
                              - language
                              - embedding
                              - image
                          tags:
                            type: array
                            items:
                              type: string
                              enum:
                                - reasoning
                                - tool-use
                                - vision
                                - file-input
                                - image-generation
                                - implicit-caching
                          contextWindow:
                            type: number
                          maxTokens:
                            type: number
                          description:
                            type: string
                        required:
                          - id
                          - label
                    capabilities:
                      type: object
                      properties:
                        disableActions:
                          type: array
                          items:
                            type: string
                    aiGatewayApiKey:
                      type: string
                    aiGatewayBaseUrl:
                      type: string
                      format: uri
                    attachmentTest:
                      type: object
                      properties:
                        urlMode:
                          type: object
                          properties:
                            success:
                              type: boolean
                            errorMessage:
                              type: string
                          required:
                            - success
                        base64Mode:
                          type: object
                          properties:
                            success:
                              type: boolean
                            errorMessage:
                              type: string
                          required:
                            - success
                        testedAt:
                          type: string
                        testedOrigin:
                          type: string
                        recommendedMode:
                          type: string
                          enum:
                            - url
                            - base64
                    attachmentTransferMode:
                      type: string
                      enum:
                        - url
                        - base64
                      default: url
                    aiGatewayApiKeys:
                      type: array
                      items:
                        type: string
                    vertexByokCredential:
                      type: object
                      properties:
                        project:
                          type: string
                        location:
                          type: string
                        googleCredentials:
                          type: object
                          properties:
                            privateKey:
                              type: string
                            clientEmail:
                              type: string
                          required:
                            - privateKey
                            - clientEmail
                      required:
                        - project
                        - location
                        - googleCredentials
                    concurrencyGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          taskTypes:
                            type: array
                            items:
                              type: string
                              enum:
                                - text
                                - image
                            default: []
                          keys:
                            type: array
                            items:
                              type: object
                              properties:
                                apiKey:
                                  type: string
                                status:
                                  type: string
                                  enum:
                                    - verified
                                    - untested
                                    - error
                                  default: untested
                              required:
                                - apiKey
                            default: []
                          perKey:
                            type: number
                            minimum: 1
                            maximum: 100
                            default: 5
                        required:
                          - id
                          - name
                    concurrencyPerKey:
                      type: number
                      minimum: 1
                      maximum: 100
                    appConfig:
                      type: object
                      properties:
                        apiKey:
                          type: string
                        vercelToken:
                          type: string
                        customDomain:
                          type: string
                        creditCount:
                          type: number
                          minimum: 0
                        v0BaseUrl:
                          type: string
                          format: uri
                        vercelBaseUrl:
                          type: string
                          format: uri
      responses:
        '200':
          description: Successful response.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://app.teable.ai/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"enable":true,"config":{"llmProviders":[],"embeddingModel":"string","translationModel":"string","chatModel":{"lg":"string","md":"string","sm":"string","ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true}},"gatewayModels":[{"id":"string","label":"string","enabled":true,"capabilities":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string"},"rates":{"inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0},"isImageModel":true,"defaultFor":["chatLg"],"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["reasoning"],"contextWindow":0,"maxTokens":0,"description":"string"}],"capabilities":{"disableActions":["string"]},"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"appConfig":{"apiKey":"string","vercelToken":"string","customDomain":"string","creditCount":0,"v0BaseUrl":"http://example.com","vercelBaseUrl":"http://example.com"}}}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D';

            const options = {
              method: 'PATCH',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"enable":true,"config":{"llmProviders":[],"embeddingModel":"string","translationModel":"string","chatModel":{"lg":"string","md":"string","sm":"string","ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true}},"gatewayModels":[{"id":"string","label":"string","enabled":true,"capabilities":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string"},"rates":{"inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0},"isImageModel":true,"defaultFor":["chatLg"],"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["reasoning"],"contextWindow":0,"maxTokens":0,"description":"string"}],"capabilities":{"disableActions":["string"]},"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"appConfig":{"apiKey":"string","vercelToken":"string","customDomain":"string","creditCount":0,"v0BaseUrl":"http://example.com","vercelBaseUrl":"http://example.com"}}}'
            };


            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/space/%7BspaceId%7D/integration/%7BintegrationId%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({
              enable: true,
              config: {
                llmProviders: [],
                embeddingModel: 'string',
                translationModel: 'string',
                chatModel: {
                  lg: 'string',
                  md: 'string',
                  sm: 'string',
                  ability: {
                    image: true,
                    pdf: true,
                    webSearch: true,
                    toolCall: true,
                    reasoning: true,
                    imageGeneration: true
                  }
                },
                gatewayModels: [
                  {
                    id: 'string',
                    label: 'string',
                    enabled: true,
                    capabilities: {
                      image: true,
                      pdf: true,
                      webSearch: true,
                      toolCall: true,
                      reasoning: true,
                      imageGeneration: true
                    },
                    pricing: {
                      input: 'string',
                      output: 'string',
                      inputCacheRead: 'string',
                      inputCacheWrite: 'string',
                      reasoning: 'string',
                      image: 'string',
                      webSearch: 'string'
                    },
                    rates: {
                      inputRate: 0,
                      outputRate: 0,
                      cacheReadRate: 0,
                      cacheWriteRate: 0,
                      reasoningRate: 0,
                      imageRate: 0,
                      webSearchRate: 0
                    },
                    isImageModel: true,
                    defaultFor: ['chatLg'],
                    testedAt: 0,
                    ownedBy: 'alibaba',
                    modelType: 'language',
                    tags: ['reasoning'],
                    contextWindow: 0,
                    maxTokens: 0,
                    description: 'string'
                  }
                ],
                capabilities: {disableActions: ['string']},
                aiGatewayApiKey: 'string',
                aiGatewayBaseUrl: 'http://example.com',
                attachmentTest: {
                  urlMode: {success: true, errorMessage: 'string'},
                  base64Mode: {success: true, errorMessage: 'string'},
                  testedAt: 'string',
                  testedOrigin: 'string',
                  recommendedMode: 'url'
                },
                attachmentTransferMode: 'url',
                aiGatewayApiKeys: ['string'],
                vertexByokCredential: {
                  project: 'string',
                  location: 'string',
                  googleCredentials: {privateKey: 'string', clientEmail: 'string'}
                },
                concurrencyGroups: [{id: 'string', name: 'string', taskTypes: [], keys: [], perKey: 5}],
                concurrencyPerKey: 1,
                appConfig: {
                  apiKey: 'string',
                  vercelToken: 'string',
                  customDomain: 'string',
                  creditCount: 0,
                  v0BaseUrl: 'http://example.com',
                  vercelBaseUrl: 'http://example.com'
                }
              }
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


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


            payload =
            "{\"enable\":true,\"config\":{\"llmProviders\":[],\"embeddingModel\":\"string\",\"translationModel\":\"string\",\"chatModel\":{\"lg\":\"string\",\"md\":\"string\",\"sm\":\"string\",\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true}},\"gatewayModels\":[{\"id\":\"string\",\"label\":\"string\",\"enabled\":true,\"capabilities\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\"},\"rates\":{\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0},\"isImageModel\":true,\"defaultFor\":[\"chatLg\"],\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"reasoning\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"}],\"capabilities\":{\"disableActions\":[\"string\"]},\"aiGatewayApiKey\":\"string\",\"aiGatewayBaseUrl\":\"http://example.com\",\"attachmentTest\":{\"urlMode\":{\"success\":true,\"errorMessage\":\"string\"},\"base64Mode\":{\"success\":true,\"errorMessage\":\"string\"},\"testedAt\":\"string\",\"testedOrigin\":\"string\",\"recommendedMode\":\"url\"},\"attachmentTransferMode\":\"url\",\"aiGatewayApiKeys\":[\"string\"],\"vertexByokCredential\":{\"project\":\"string\",\"location\":\"string\",\"googleCredentials\":{\"privateKey\":\"string\",\"clientEmail\":\"string\"}},\"concurrencyGroups\":[{\"id\":\"string\",\"name\":\"string\",\"taskTypes\":[],\"keys\":[],\"perKey\":5}],\"concurrencyPerKey\":1,\"appConfig\":{\"apiKey\":\"string\",\"vercelToken\":\"string\",\"customDomain\":\"string\",\"creditCount\":0,\"v0BaseUrl\":\"http://example.com\",\"vercelBaseUrl\":\"http://example.com\"}}}"


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


            conn.request("PATCH",
            "/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


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

````