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

# Import Airtable base with progress

> import an Airtable base with SSE progress stream



## OpenAPI

````yaml /swagger.json post /base/import-airtable/stream
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: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /base/import-airtable/stream:
    post:
      tags:
        - base
      summary: import an Airtable base with SSE progress events
      description: import an Airtable base with SSE progress stream
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                spaceId:
                  type: string
                  description: >-
                    Target space for the new project. Required only when baseId
                    is omitted; when importing into an existing project the
                    project's own space is used and spaceId is ignored.
                baseId:
                  type: string
                  description: >-
                    Import into this existing project (add its tables) instead
                    of creating a new one. When omitted, a new project named
                    baseName is created in spaceId.
                folderId:
                  type: string
                  description: >-
                    Target folder (node id or folder id); requires baseId,
                    tables land at root when omitted.
                integrationId:
                  type: string
                  description: >-
                    Id of a connected Airtable user integration; its access
                    token is resolved (and refreshed) server-side and never
                    leaves the server.
                accessToken:
                  type: string
                  minLength: 1
                  description: >-
                    Airtable personal access token for direct API usage (never
                    persisted by the server). Ignored when integrationId is
                    provided.
                airtableBaseId:
                  type: string
                  minLength: 1
                baseName:
                  type: string
                  minLength: 1
                  description: >-
                    Name for the created project (normally the Airtable base
                    name). Required unless baseId is set.
                importRecords:
                  type: boolean
                  description: >-
                    Import record data (default true). When false only the
                    structure is created.
                importAttachments:
                  type: boolean
                  description: >-
                    Download attachments from Airtable and re-upload them
                    (default true).
                importViewConfig:
                  type: boolean
                  description: >-
                    Import view filters, sorts, grouping and kanban stacking.
                    Requires shareLink, because the official Airtable API does
                    not expose view configuration.
                shareLink:
                  type: string
                  description: >-
                    Public Airtable shared-base link
                    (https://airtable.com/appXXX/shrYYY). Used read-only to read
                    view configuration; must point at airtableBaseId. The token
                    never sees it.
              required:
                - airtableBaseId
      responses:
        '200':
          description: SSE stream with progress events and final result
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/base/import-airtable/stream \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"spaceId":"string","baseId":"string","folderId":"string","integrationId":"string","accessToken":"string","airtableBaseId":"string","baseName":"string","importRecords":true,"importAttachments":true,"importViewConfig":true,"shareLink":"string"}'
        - lang: JavaScript
          source: |-
            const url = 'https://app.teable.ai/api/base/import-airtable/stream';
            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"spaceId":"string","baseId":"string","folderId":"string","integrationId":"string","accessToken":"string","airtableBaseId":"string","baseName":"string","importRecords":true,"importAttachments":true,"importViewConfig":true,"shareLink":"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: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/base/import-airtable/stream',
              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({
              spaceId: 'string',
              baseId: 'string',
              folderId: 'string',
              integrationId: 'string',
              accessToken: 'string',
              airtableBaseId: 'string',
              baseName: 'string',
              importRecords: true,
              importAttachments: true,
              importViewConfig: true,
              shareLink: 'string'
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


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


            payload =
            "{\"spaceId\":\"string\",\"baseId\":\"string\",\"folderId\":\"string\",\"integrationId\":\"string\",\"accessToken\":\"string\",\"airtableBaseId\":\"string\",\"baseName\":\"string\",\"importRecords\":true,\"importAttachments\":true,\"importViewConfig\":true,\"shareLink\":\"string\"}"


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


            conn.request("POST", "/api/base/import-airtable/stream", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


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

````