← Marketplace
Skill

aitable-api

Skills
by apitable

Categories

Engineering

installs

0

Published

May 2, 2026

Updated

May 13, 2026

Description

Use AITable.ai REST API via curl to manage online spreadsheet data. ALWAYS use this skill when users mention AITable, aitable.ai, aitable, vika, or any of these patterns: - IDs starting with "dst" (datasheet), "spc" (space), "fld" (field), "rec" (record), "viw" (view) - Online collaborative tables/spreadsheets with API operations - Batch import/export data to online tables - Read/create/update/delete records via API - Upload attachments to datasheets - Search datasheets or spaces, list workspaces - Member fields, team management in online tables This skill provides complete curl command examples for AITable REST API. Use it even if the user just mentions "aitable" casually or wants to automate any aitable operations.

AITable.ai API Skill

Interact with AITable.ai via curl commands. No scripts needed - just direct API calls.

Setup

Before making API calls, ensure environment variables are set:

bash
# Set default host if not already set
[ -z "$AITABLE_HOST" ] && export AITABLE_HOST="https://aitable.ai"

# API token is required (get from User Center > Developer Token)
# export AITABLE_TOKEN="uskXXXXXXXXXXXXX"

Run the first line before any curl commands to ensure AITABLE_HOST has the default value.

Quick Reference

OperationEndpointMethod
Get records/fusion/v1/datasheets/{dstId}/recordsGET
Create records/fusion/v1/datasheets/{dstId}/recordsPOST
Update records/fusion/v1/datasheets/{dstId}/recordsPATCH
Delete records/fusion/v1/datasheets/{dstId}/records?recordIds=DELETE
Get fields/fusion/v1/datasheets/{dstId}/fieldsGET
Create field/fusion/v1/spaces/{spcId}/datasheets/{dstId}/fieldsPOST
Delete field/fusion/v1/spaces/{spcId}/datasheets/{dstId}/fields/{fldId}DELETE
Get views/fusion/v1/datasheets/{dstId}/viewsGET
Create datasheet/fusion/v1/spaces/{spcId}/datasheetsPOST
Upload attachment/fusion/v1/datasheets/{dstId}/attachmentsPOST
Get spaces/fusion/v1/spacesGET
Get nodes/fusion/v1/spaces/{spcId}/nodesGET
Search nodes/fusion/v2/spaces/{spcId}/nodes?type=GET
Get node detail/fusion/v1/spaces/{spcId}/nodes/{nodeId}GET

Basic Examples

bash
# Get all records
curl -X GET "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/records" \
  -H "Authorization: Bearer $AITABLE_TOKEN"

# Create records
curl -X POST "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/records" \
  -H "Authorization: Bearer $AITABLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"records":[{"fields":{"Title":"New Task","Status":"Todo"}}]}'

# Update records
curl -X PATCH "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/records" \
  -H "Authorization: Bearer $AITABLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"records":[{"recordId":"recXXX","fields":{"Status":"Done"}}]}'

# Delete records
curl -X DELETE "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/records?recordIds=recXXX&recordIds=recYYY" \
  -H "Authorization: Bearer $AITABLE_TOKEN"

# Upload attachment
curl -X POST "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/attachments" \
  -H "Authorization: Bearer $AITABLE_TOKEN" \
  -F "file=@/path/to/image.png"

# Get spaces list
curl -X GET "$AITABLE_HOST/fusion/v1/spaces" \
  -H "Authorization: Bearer $AITABLE_TOKEN"

# Search datasheets by name
curl -X GET "$AITABLE_HOST/fusion/v2/spaces/spcXXX/nodes?type=Datasheet&query=keyword" \
  -H "Authorization: Bearer $AITABLE_TOKEN"

Response Format

All responses:

json
{"success": true, "code": 200, "message": "SUCCESS", "data": {...}}

Important: cellFormat Parameter for Reading Records

When user wants to read/query records and does NOT specify cellFormat in their request, ASK them to choose:

"Which cell format do you prefer for the response?

  • string - Human-friendly format, all values converted to strings, dates formatted. Best for viewing data or exporting to CSV.
  • json - Structured format (default), preserves original types. Best for script processing or multi-step automation.

Use string for simple data viewing; use json for programmatic processing."

Usage:

bash
# Human-readable format (string)
curl -X GET "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/records?cellFormat=string" \
  -H "Authorization: Bearer $AITABLE_TOKEN"

# Structured format for scripts (json, default)
curl -X GET "$AITABLE_HOST/fusion/v1/datasheets/dstXXX/records?cellFormat=json" \
  -H "Authorization: Bearer $AITABLE_TOKEN"

When to skip asking:

  • User mentions "human readable", "export CSV", "view data", "display" → use string
  • User mentions "script", "automation", "pipeline", "multi-step", "parse" → use json
  • Complex multi-step operations or chained commands → use json

Detailed Documentation

For complete parameter details and examples, read the reference files:

ReferenceWhen to read
references/records.mdRecord CRUD with filtering, sorting, pagination
references/fields.mdField types, create/delete fields
references/views.mdGet view list
references/datasheets.mdCreate new datasheets
references/attachments.mdUpload files and use in records
references/spaces-nodes.mdWorkspaces, folders, search
references/members-teams.mdUser and team management
references/field-types.mdAll field value formats

Tips

  1. Use fieldKey=id for stability (field IDs don't change when renamed)
  2. Max 10 records per create/update request
  3. URL-encode filterByFormula values
  4. Upload attachment first, then use its token in record fields