Coda API 一站式托管集成
简介
通过托管OAuth安全连接Coda API,支持文档、表格、页面的完整CRUD操作与权限管理,适合企业级数据自动化。
原始描述
Coda API integration with managed OAuth. Manage docs, pages, tables, rows, and formulas. Use this skill when users want to read, create, update, or delete Co...
通过你的 Agent 添加
安装目录:coda-40893/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: coda
description: |
Coda API integration with managed OAuth. Manage docs, pages, tables, rows, and formulas.
Use this skill when users want to read, create, update, or delete Coda docs, pages, tables, or rows.
For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
compatibility: Requires network access and valid Maton API key
metadata:
author: maton
version: "1.0"
clawdbot:
emoji: 🧠
homepage: "https://maton.ai"
requires:
env:
- MATON_API_KEY
Coda
Access the Coda API with managed OAuth authentication. Manage docs, pages, tables, rows, formulas, and controls with full CRUD operations.
Quick Start
# List your docs
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/coda/apis/v1/docs')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Base URL
https://api.maton.ai/coda/apis/v1/{resource}
# List your docs
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/coda/apis/v1/docs')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://api.maton.ai/coda/apis/v1/{resource}
Maton proxies requests to coda.io/apis/v1 and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Coda OAuth connections at https://api.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=coda&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'coda'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=coda&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'coda'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2026-02-12T01:38:10.500238Z",
"last_updated_time": "2026-02-12T01:38:33.545353Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "coda",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Specifying Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple Coda connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/coda/apis/v1/docs')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple connections, always include this header to ensure requests go to the intended account.
Security & Permissions
- Access is scoped to docs, pages, tables, rows, and formulas within the connected Coda account.
- All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
API Reference
Account
Get Current User
GET /coda/apis/v1/whoami
Account
GET /coda/apis/v1/whoami
Returns information about the authenticated user.
Docs
List Docs
GET /coda/apis/v1/docs
Query parameters:
isOwner- Show only owned docs (true/false)query- Search querysourceDoc- Filter by source doc IDisStarred- Show only starred docsinGallery- Show only gallery docsworkspaceId- Filter by workspacefolderId- Filter by folderlimit- Page size (default: 25, max: 200)pageToken- Pagination token
Create Doc
POST /coda/apis/v1/docs
Content-Type: application/json
{
"title": "My New Doc",
"sourceDoc": "optional-source-doc-id",
"timezone": "America/Los_Angeles",
"folderId": "optional-folder-id"
}
Get Doc
GET /coda/apis/v1/docs/{docId}
Delete Doc
DELETE /coda/apis/v1/docs/{docId}
Pages
List Pages
GET /coda/apis/v1/docs/{docId}/pages
POST /coda/apis/v1/docs
Content-Type: application/json
{
"title": "My New Doc",
"sourceDoc": "optional-source-doc-id",
"timezone": "America/Los_Angeles",
"folderId": "optional-folder-id"
}
GET /coda/apis/v1/docs/{docId}
Delete Doc
DELETE /coda/apis/v1/docs/{docId}
Pages
List Pages
GET /coda/apis/v1/docs/{docId}/pages
DELETE /coda/apis/v1/docs/{docId}
List Pages
GET /coda/apis/v1/docs/{docId}/pages
Query parameters:
limit- Page sizepageToken- Pagination token
Create Page
POST /coda/apis/v1/docs/{docId}/pages
Content-Type: application/json
{
"name": "New Page",
"subtitle": "Optional subtitle",
"parentPageId": "optional-parent-page-id"
}
Get Page
GET /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Update Page
PUT /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Content-Type: application/json
{
"name": "Updated Page Name",
"subtitle": "Updated subtitle"
}
Delete Page
DELETE /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Tables
List Tables
GET /coda/apis/v1/docs/{docId}/tables
POST /coda/apis/v1/docs/{docId}/pages
Content-Type: application/json
{
"name": "New Page",
"subtitle": "Optional subtitle",
"parentPageId": "optional-parent-page-id"
}
GET /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Update Page
PUT /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Content-Type: application/json
{
"name": "Updated Page Name",
"subtitle": "Updated subtitle"
}
Delete Page
DELETE /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Tables
List Tables
GET /coda/apis/v1/docs/{docId}/tables
PUT /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Content-Type: application/json
{
"name": "Updated Page Name",
"subtitle": "Updated subtitle"
}
DELETE /coda/apis/v1/docs/{docId}/pages/{pageIdOrName}
Tables
List Tables
GET /coda/apis/v1/docs/{docId}/tables
Query parameters:
limit- Page sizepageToken- Pagination tokensortBy- Sort by fieldtableTypes- Filter by table type
Get Table
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}
Columns
List Columns
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/columns
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}
List Columns
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/columns
Query parameters:
limit- Page sizepageToken- Pagination token
Get Column
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/columns/{columnIdOrName}
Rows
List Rows
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/columns/{columnIdOrName}
List Rows
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows
Query parameters:
query- Filter rows by search queryuseColumnNames- Use column names instead of IDs in response (true/false)valueFormat- Value format (simple, simpleWithArrays, rich)sortBy- Sort by columnlimit- Page sizepageToken- Pagination token
Get Row
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
GET /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
Query parameters:
useColumnNames- Use column names instead of IDsvalueFormat- Value format
Insert/Upsert Rows
POST /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows
Content-Type: application/json
{
"rows": [
{
"cells": [
{"column": "Column Name", "value": "Cell Value"},
{"column": "Another Column", "value": 123}
]
}
],
"keyColumns": ["Column Name"]
}
- Use
keyColumns for upsert behavior (update if exists, insert if not)
- Row inserts/upserts are processed asynchronously (returns requestId)
Update Row
PUT /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
Content-Type: application/json
{
"row": {
"cells": [
{"column": "Column Name", "value": "Updated Value"}
]
}
}
Delete Row
DELETE /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
Formulas
List Formulas
GET /coda/apis/v1/docs/{docId}/formulas
Get Formula
GET /coda/apis/v1/docs/{docId}/formulas/{formulaIdOrName}
Controls
List Controls
GET /coda/apis/v1/docs/{docId}/controls
Get Control
GET /coda/apis/v1/docs/{docId}/controls/{controlIdOrName}
Permissions
Get Sharing Metadata
GET /coda/apis/v1/docs/{docId}/acl/metadata
List Permissions
GET /coda/apis/v1/docs/{docId}/acl/permissions
Add Permission
POST /coda/apis/v1/docs/{docId}/acl/permissions
Content-Type: application/json
{
"access": "readonly",
"principal": {
"type": "email",
"email": "user@example.com"
}
}
POST /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows
Content-Type: application/json
{
"rows": [
{
"cells": [
{"column": "Column Name", "value": "Cell Value"},
{"column": "Another Column", "value": 123}
]
}
],
"keyColumns": ["Column Name"]
}
keyColumns for upsert behavior (update if exists, insert if not)PUT /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
Content-Type: application/json
{
"row": {
"cells": [
{"column": "Column Name", "value": "Updated Value"}
]
}
}
Delete Row
DELETE /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
Formulas
List Formulas
GET /coda/apis/v1/docs/{docId}/formulas
Get Formula
GET /coda/apis/v1/docs/{docId}/formulas/{formulaIdOrName}
Controls
List Controls
GET /coda/apis/v1/docs/{docId}/controls
Get Control
GET /coda/apis/v1/docs/{docId}/controls/{controlIdOrName}
Permissions
Get Sharing Metadata
GET /coda/apis/v1/docs/{docId}/acl/metadata
List Permissions
GET /coda/apis/v1/docs/{docId}/acl/permissions
Add Permission
POST /coda/apis/v1/docs/{docId}/acl/permissions
Content-Type: application/json
{
"access": "readonly",
"principal": {
"type": "email",
"email": "user@example.com"
}
}
DELETE /coda/apis/v1/docs/{docId}/tables/{tableIdOrName}/rows/{rowIdOrName}
List Formulas
GET /coda/apis/v1/docs/{docId}/formulas
GET /coda/apis/v1/docs/{docId}/formulas/{formulaIdOrName}
Controls
List Controls
GET /coda/apis/v1/docs/{docId}/controls
Get Control
GET /coda/apis/v1/docs/{docId}/controls/{controlIdOrName}
Permissions
Get Sharing Metadata
GET /coda/apis/v1/docs/{docId}/acl/metadata
List Permissions
GET /coda/apis/v1/docs/{docId}/acl/permissions
Add Permission
POST /coda/apis/v1/docs/{docId}/acl/permissions
Content-Type: application/json
{
"access": "readonly",
"principal": {
"type": "email",
"email": "user@example.com"
}
}
GET /coda/apis/v1/docs/{docId}/controls/{controlIdOrName}
Get Sharing Metadata
GET /coda/apis/v1/docs/{docId}/acl/metadata
GET /coda/apis/v1/docs/{docId}/acl/permissions
Add Permission
POST /coda/apis/v1/docs/{docId}/acl/permissions
Content-Type: application/json
{
"access": "readonly",
"principal": {
"type": "email",
"email": "user@example.com"
}
}
POST /coda/apis/v1/docs/{docId}/acl/permissions
Content-Type: application/json
{
"access": "readonly",
"principal": {
"type": "email",
"email": "user@example.com"
}
}
Access values: readonly, write, comment
Delete Permission
DELETE /coda/apis/v1/docs/{docId}/acl/permissions/{permissionId}
Categories
List Categories
GET /coda/apis/v1/categories
Utilities
Resolve Browser Link
GET /coda/apis/v1/resolveBrowserLink?url={encodedUrl}
DELETE /coda/apis/v1/docs/{docId}/acl/permissions/{permissionId}
List Categories
GET /coda/apis/v1/categories
Resolve Browser Link
GET /coda/apis/v1/resolveBrowserLink?url={encodedUrl}
Converts a Coda browser URL to API resource information.
Get Mutation Status
GET /coda/apis/v1/mutationStatus/{requestId}
GET /coda/apis/v1/mutationStatus/{requestId}
Check the status of an asynchronous mutation operation.
Analytics
List Doc Analytics
GET /coda/apis/v1/analytics/docs
Query parameters:
isPublished- Filter by published statussinceDate- Start date (YYYY-MM-DD)untilDate- End date (YYYY-MM-DD)limit- Page sizepageToken- Pagination token
List Pack Analytics
GET /coda/apis/v1/analytics/packs
Get Analytics Update Time
GET /coda/apis/v1/analytics/updated
Pagination
GET /coda/apis/v1/analytics/packs
GET /coda/apis/v1/analytics/updated
Pagination
Coda uses cursor-based pagination with pageToken:
GET /coda/apis/v1/docs?limit=25
Response includes nextPageToken when more results exist:
{
"items": [...],
"href": "https://coda.io/apis/v1/docs?pageToken=...",
"nextPageToken": "eyJsaW1..."
}
Use the nextPageToken value as pageToken in subsequent requests.
Asynchronous Mutations
Create, update, and delete operations return HTTP 202 with a requestId:
{
"id": "canvas-abc123",
"requestId": "mutate:9f038510-be42-4d16-bccf-3468d38efd57"
}
Check mutation status:
GET /coda/apis/v1/mutationStatus/mutate:9f038510-be42-4d16-bccf-3468d38efd57
Response:
{
"completed": true
}
Mutations are generally processed within a few seconds.
Code Examples
JavaScript - List Docs
const response = await fetch(
'https://api.maton.ai/coda/apis/v1/docs?limit=10',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const data = await response.json();
console.log(data.items);
Python - List Docs
import os
import requests
response = requests.get(
'https://api.maton.ai/coda/apis/v1/docs',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
params={'limit': 10}
)
data = response.json()
for doc in data['items']:
print(f"{doc['name']}: {doc['id']}")
Python - Create Doc and Page
import os
import requests
headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
base_url = 'https://api.maton.ai/coda/apis/v1'
# Create doc
doc_response = requests.post(
f'{base_url}/docs',
headers=headers,
json={'title': 'My New Doc'}
)
doc = doc_response.json()
print(f"Created doc: {doc['id']}")
# Create page
page_response = requests.post(
f'{base_url}/docs/{doc["id"]}/pages',
headers=headers,
json={'name': 'First Page', 'subtitle': 'Created via API'}
)
page = page_response.json()
print(f"Created page: {page['id']}")
Python - Insert Rows
import os
import requests
headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
response = requests.post(
'https://api.maton.ai/coda/apis/v1/docs/{docId}/tables/{tableId}/rows',
headers=headers,
json={
'rows': [
{
'cells': [
{'column': 'Name', 'value': 'John Doe'},
{'column': 'Email', 'value': 'john@example.com'}
]
}
]
}
)
result = response.json()
print(f"Request ID: {result['requestId']}")
Notes
- Doc IDs look like
s0ekj2vV-v
- Page IDs start with
canvas-
- Table and column names can be used instead of IDs
- Row operations require a base table (not views)
- Create/Update/Delete operations are asynchronous (return requestId)
- Newly created docs may take a moment to be accessible via API (409 error)
- Page-level analytics require Enterprise plan
- IMPORTANT: When using curl commands, use
curl -g when URLs contain brackets to disable glob parsing
- IMPORTANT: When piping curl output to
jq, environment variables may not expand correctly. Use Python examples instead.
Rate Limits
Operation
Limit
Reading data
100 requests per 6 seconds
Writing data
10 requests per 6 seconds
Writing doc content
5 requests per 10 seconds
Listing docs
4 requests per 6 seconds
Reading analytics
100 requests per 6 seconds
Error Handling
Status
Meaning
400
Missing Coda connection or invalid request
401
Invalid or missing Maton API key
404
Resource not found
409
Doc not yet accessible (just created)
429
Rate limited
4xx/5xx
Passthrough error from Coda API
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Invalid App Name
- Ensure your URL path starts with
coda. For example:
- Correct:
https://api.maton.ai/coda/apis/v1/docs
- Incorrect:
https://api.maton.ai/apis/v1/docs
Resources
import os
import requests
response = requests.get(
'https://api.maton.ai/coda/apis/v1/docs',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
params={'limit': 10}
)
data = response.json()
for doc in data['items']:
print(f"{doc['name']}: {doc['id']}")
import os
import requests
headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
base_url = 'https://api.maton.ai/coda/apis/v1'
# Create doc
doc_response = requests.post(
f'{base_url}/docs',
headers=headers,
json={'title': 'My New Doc'}
)
doc = doc_response.json()
print(f"Created doc: {doc['id']}")
# Create page
page_response = requests.post(
f'{base_url}/docs/{doc["id"]}/pages',
headers=headers,
json={'name': 'First Page', 'subtitle': 'Created via API'}
)
page = page_response.json()
print(f"Created page: {page['id']}")
Python - Insert Rows
import os
import requests
headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
response = requests.post(
'https://api.maton.ai/coda/apis/v1/docs/{docId}/tables/{tableId}/rows',
headers=headers,
json={
'rows': [
{
'cells': [
{'column': 'Name', 'value': 'John Doe'},
{'column': 'Email', 'value': 'john@example.com'}
]
}
]
}
)
result = response.json()
print(f"Request ID: {result['requestId']}")
Notes
- Doc IDs look like
s0ekj2vV-v
- Page IDs start with
canvas-
- Table and column names can be used instead of IDs
- Row operations require a base table (not views)
- Create/Update/Delete operations are asynchronous (return requestId)
- Newly created docs may take a moment to be accessible via API (409 error)
- Page-level analytics require Enterprise plan
- IMPORTANT: When using curl commands, use
curl -g when URLs contain brackets to disable glob parsing
- IMPORTANT: When piping curl output to
jq, environment variables may not expand correctly. Use Python examples instead.
Rate Limits
Operation
Limit
Reading data
100 requests per 6 seconds
Writing data
10 requests per 6 seconds
Writing doc content
5 requests per 10 seconds
Listing docs
4 requests per 6 seconds
Reading analytics
100 requests per 6 seconds
Error Handling
Status
Meaning
400
Missing Coda connection or invalid request
401
Invalid or missing Maton API key
404
Resource not found
409
Doc not yet accessible (just created)
429
Rate limited
4xx/5xx
Passthrough error from Coda API
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Invalid App Name
- Ensure your URL path starts with
coda. For example:
- Correct:
https://api.maton.ai/coda/apis/v1/docs
- Incorrect:
https://api.maton.ai/apis/v1/docs
Resources
import os
import requests
headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
response = requests.post(
'https://api.maton.ai/coda/apis/v1/docs/{docId}/tables/{tableId}/rows',
headers=headers,
json={
'rows': [
{
'cells': [
{'column': 'Name', 'value': 'John Doe'},
{'column': 'Email', 'value': 'john@example.com'}
]
}
]
}
)
result = response.json()
print(f"Request ID: {result['requestId']}")
- Doc IDs look like
s0ekj2vV-v - Page IDs start with
canvas- - Table and column names can be used instead of IDs
- Row operations require a base table (not views)
- Create/Update/Delete operations are asynchronous (return requestId)
- Newly created docs may take a moment to be accessible via API (409 error)
- Page-level analytics require Enterprise plan
- IMPORTANT: When using curl commands, use
curl -gwhen URLs contain brackets to disable glob parsing - IMPORTANT: When piping curl output to
jq, environment variables may not expand correctly. Use Python examples instead.
Rate Limits
Operation
Limit
Reading data
100 requests per 6 seconds
Writing data
10 requests per 6 seconds
Writing doc content
5 requests per 10 seconds
Listing docs
4 requests per 6 seconds
Reading analytics
100 requests per 6 seconds
Error Handling
Status
Meaning
400
Missing Coda connection or invalid request
401
Invalid or missing Maton API key
404
Resource not found
409
Doc not yet accessible (just created)
429
Rate limited
4xx/5xx
Passthrough error from Coda API
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Invalid App Name
| Operation | Limit |
|---|---|
| Reading data | 100 requests per 6 seconds |
| Writing data | 10 requests per 6 seconds |
| Writing doc content | 5 requests per 10 seconds |
| Listing docs | 4 requests per 6 seconds |
| Reading analytics | 100 requests per 6 seconds |
| Status | Meaning |
|---|---|
| 400 | Missing Coda connection or invalid request |
| 401 | Invalid or missing Maton API key |
| 404 | Resource not found |
| 409 | Doc not yet accessible (just created) |
| 429 | Rate limited |
| 4xx/5xx | Passthrough error from Coda API |
Troubleshooting: API Key Issues
MATON_API_KEY environment variable is set:echo $MATON_API_KEY
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
- Ensure your URL path starts with
coda. For example:
- Correct:
https://api.maton.ai/coda/apis/v1/docs - Incorrect:
https://api.maton.ai/apis/v1/docs
Resources
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。