简介
通过托管 OAuth 安全接入 Tally API,支持表单管理、数据收集、Webhook 自动化及团队协作,适合无代码表单场景的深度集成。
原始描述
Tally API integration with managed OAuth. Manage forms, submissions, workspaces, webhooks, organization users, and organization invites. All write operations...
通过你的 Agent 添加
安装目录:tally/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Tally Skill 是 Maton 平台提供的 Tally 表单服务集成工具,通过托管 OAuth 认证实现对 Tally API 的安全代理访问。用户需先在 Maton 平台获取 API Key 并建立 Tally OAuth 连接,随后即可通过 RESTful API 管理表单、查看提交数据、配置 Webhook 自动化以及管理组织成员。
主要功能模块:
- 表单管理:创建、编辑、发布、删除表单,支持 15+ 种字段类型(文本、邮箱、文件上传、支付、签名等)
- 数据收集:分页查询表单提交记录,支持日期过滤和游标分页
- Webhook 自动化:实时推送表单响应到外部 URL,替代轮询机制
- 工作区管理:多工作区隔离,支持 Pro 订阅用户创建自定义工作区
- 组织管理:成员邀请、权限管理及用户移除(需管理员权限)
典型使用流程:
- 配置
MATON_API_KEY环境变量 - 调用
/connections创建 Tally OAuth 连接 - 在浏览器完成授权后,使用
Authorization: Bearer头部调用各类 API - 多连接场景需通过
Maton-Connection头部指定目标账户
显著优点
- 托管 OAuth 安全模型:用户无需自行管理 Tally 的 OAuth 令牌刷新和存储,Maton 代理层自动处理令牌生命周期,降低凭证泄露风险
- 操作显式确认机制:所有写入操作(创建、更新、删除)及敏感操作(成员移除、Webhook 创建)均强制要求用户确认,防止误操作
- 细粒度权限控制:API 访问范围限定于表单、提交、工作区、Webhook 及组织成员管理,不涉及 Tally 账户的其他敏感数据
- 实时数据推送:Webhook 机制支持
FORM_RESPONSE 事件,实现毫秒级响应,比轮询更高效
- 多账户支持:通过
Maton-Connection 头部可在同一 API Key 下管理多个 Tally 账户,适合代运营或团队场景
潜在缺点与局限性
- 速率限制:100 请求/分钟的硬限制,高并发场景需引入队列或缓存机制
- 订阅门槛:创建工作区需 Tally Pro 订阅,免费用户仅能使用默认工作区
- Beta 状态:API 仍处于公开测试阶段,接口行为可能变更,生产环境需做好兼容性预案
- Webhook 数据敏感:表单提交可能包含 PII,Webhook 配置错误可能导致数据泄露至未授权端点
- 依赖 Maton 平台:服务可用性受制于 Maton 代理层,单点故障风险高于直连 Tally API
适合人群
- 自动化工程师:需将表单数据实时同步至 CRM、数据库或消息队列的技术团队
- 无代码/低代码开发者:通过表单收集数据并触发下游工作流的业务人员
- SaaS 代运营方:管理多个客户 Tally 账户的代理商或外包团队
- 数据分析师:需批量导出表单提交记录进行离线分析的用户
常规风险
风险类型
描述
缓解建议
数据泄露
Webhook 误配置导致表单数据发送至恶意 URL
配置前强制用户确认目标地址,支持白名单机制
成员管理误操作
DELETE 操作永久移除组织成员
二次确认目标用户邮箱及姓名
速率超限
429 错误导致服务中断
客户端实现指数退避重试
令牌失效
OAuth 连接过期导致 401 错误
监控连接状态,提前续期
环境变量泄露
MATON_API_KEY 硬编码或日志暴露
使用密钥管理系统,禁止打印敏感配置
FORM_RESPONSE 事件,实现毫秒级响应,比轮询更高效Maton-Connection 头部可在同一 API Key 下管理多个 Tally 账户,适合代运营或团队场景- 速率限制:100 请求/分钟的硬限制,高并发场景需引入队列或缓存机制
- 订阅门槛:创建工作区需 Tally Pro 订阅,免费用户仅能使用默认工作区
- Beta 状态:API 仍处于公开测试阶段,接口行为可能变更,生产环境需做好兼容性预案
- Webhook 数据敏感:表单提交可能包含 PII,Webhook 配置错误可能导致数据泄露至未授权端点
- 依赖 Maton 平台:服务可用性受制于 Maton 代理层,单点故障风险高于直连 Tally API
适合人群
- 自动化工程师:需将表单数据实时同步至 CRM、数据库或消息队列的技术团队
- 无代码/低代码开发者:通过表单收集数据并触发下游工作流的业务人员
- SaaS 代运营方:管理多个客户 Tally 账户的代理商或外包团队
- 数据分析师:需批量导出表单提交记录进行离线分析的用户
常规风险
风险类型
描述
缓解建议
数据泄露
Webhook 误配置导致表单数据发送至恶意 URL
配置前强制用户确认目标地址,支持白名单机制
成员管理误操作
DELETE 操作永久移除组织成员
二次确认目标用户邮箱及姓名
速率超限
429 错误导致服务中断
客户端实现指数退避重试
令牌失效
OAuth 连接过期导致 401 错误
监控连接状态,提前续期
环境变量泄露
MATON_API_KEY 硬编码或日志暴露
使用密钥管理系统,禁止打印敏感配置
| 风险类型 | 描述 | 缓解建议 |
|---|---|---|
| 数据泄露 | Webhook 误配置导致表单数据发送至恶意 URL | 配置前强制用户确认目标地址,支持白名单机制 |
| 成员管理误操作 | DELETE 操作永久移除组织成员 | 二次确认目标用户邮箱及姓名 |
| 速率超限 | 429 错误导致服务中断 | 客户端实现指数退避重试 |
| 令牌失效 | OAuth 连接过期导致 401 错误 | 监控连接状态,提前续期 |
| 环境变量泄露 | MATON_API_KEY 硬编码或日志暴露 |
使用密钥管理系统,禁止打印敏感配置 |
技能正文
name: tally
description: |
Tally API integration with managed OAuth. Manage forms, submissions, workspaces, webhooks, organization users, and organization invites.
All write operations require explicit user approval. Organization user removal and invite management affect account membership. Webhooks send form submission data (which may contain personal information) to external URLs — confirm the destination before creating.
Use this skill when users want to manage Tally forms, submissions, workspaces, or organization membership. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Requires network access and valid Maton API key.
metadata:
author: maton
version: "1.0"
clawdbot:
emoji: 🧠
requires:
env:
- MATON_API_KEY
Tally
Access the Tally API with managed OAuth authentication. Manage forms, submissions, workspaces, and webhooks for your Tally account.
Quick Start
# List your forms
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/tally/forms')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('User-Agent', 'Maton/1.0')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Base URL
https://api.maton.ai/tally/{native-api-path}
# List your forms
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/tally/forms')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('User-Agent', 'Maton/1.0')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://api.maton.ai/tally/{native-api-path}
Maton proxies requests to api.tally.so and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header and the User Agent header:
Authorization: Bearer $MATON_API_KEY
User-Agent: Maton/1.0
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 Tally 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=tally&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': 'tally'}).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=tally&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': 'tally'}).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-07T21:00:31.222600Z",
"last_updated_time": "2026-02-07T21:00:37.821240Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "tally",
"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 Tally 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/tally/forms')
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 forms, submissions, workspaces, webhooks, organization users, and organization invites within the connected Tally 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.
- Organization membership operations (removing users, creating/cancelling invites) affect who has access to the Tally organization. Confirm the target user/email and intent before executing.
- Webhooks send form submission data to external URLs. Submissions may contain personal or sensitive information entered by respondents. Confirm the destination URL and form with the user before creating.
API Reference
User
Get Current User
GET /tally/users/me
User
GET /tally/users/me
Response:
{
"id": "w2lBkb",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"organizationId": "n0Ze8Q",
"subscriptionPlan": "FREE",
"createdAt": "2026-02-07T20:58:54.000Z",
"updatedAt": "2026-02-07T22:50:35.000Z"
}
Forms
List Forms
GET /tally/forms
Query Parameters:
page- Page number (default: 1)limit- Items per page (default: 50)
Response:
{
"items": [
{
"id": "GxdRaQ",
"name": "Contact Form",
"workspaceId": "3jW9Q1",
"organizationId": "n0Ze8Q",
"status": "PUBLISHED",
"hasDraftBlocks": false,
"numberOfSubmissions": 42,
"createdAt": "2026-02-09T08:36:00.000Z",
"updatedAt": "2026-02-09T08:36:17.000Z",
"isClosed": false
}
],
"page": 1,
"limit": 50,
"total": 1,
"hasMore": false
}
Get Form
GET /tally/forms/{formId}
GET /tally/forms/{formId}
Response:
{
"id": "GxdRaQ",
"name": "Contact Form",
"workspaceId": "3jW9Q1",
"status": "PUBLISHED",
"blocks": [
{
"uuid": "11111111-1111-1111-1111-111111111111",
"type": "FORM_TITLE",
"groupUuid": "22222222-2222-2222-2222-222222222222",
"groupType": "FORM_TITLE",
"payload": {}
},
{
"uuid": "33333333-3333-3333-3333-333333333333",
"type": "INPUT_TEXT",
"groupUuid": "44444444-4444-4444-4444-444444444444",
"groupType": "INPUT_TEXT",
"payload": {}
}
],
"settings": null
}
Create Form
POST /tally/forms
Content-Type: application/json
{
"status": "DRAFT",
"workspaceId": "3jW9Q1",
"blocks": [
{
"type": "FORM_TITLE",
"uuid": "11111111-1111-1111-1111-111111111111",
"groupUuid": "22222222-2222-2222-2222-222222222222",
"groupType": "FORM_TITLE",
"title": "My Form",
"payload": {}
},
{
"type": "INPUT_TEXT",
"uuid": "33333333-3333-3333-3333-333333333333",
"groupUuid": "44444444-4444-4444-4444-444444444444",
"groupType": "INPUT_TEXT",
"title": "Your name",
"payload": {}
}
]
}
POST /tally/forms
Content-Type: application/json
{
"status": "DRAFT",
"workspaceId": "3jW9Q1",
"blocks": [
{
"type": "FORM_TITLE",
"uuid": "11111111-1111-1111-1111-111111111111",
"groupUuid": "22222222-2222-2222-2222-222222222222",
"groupType": "FORM_TITLE",
"title": "My Form",
"payload": {}
},
{
"type": "INPUT_TEXT",
"uuid": "33333333-3333-3333-3333-333333333333",
"groupUuid": "44444444-4444-4444-4444-444444444444",
"groupType": "INPUT_TEXT",
"title": "Your name",
"payload": {}
}
]
}
Block Types:
FORM_TITLE- Form title blockINPUT_TEXT- Single-line text inputINPUT_EMAIL- Email inputINPUT_NUMBER- Number inputINPUT_PHONE_NUMBER- Phone number inputINPUT_DATE- Date pickerINPUT_TIME- Time pickerINPUT_LINK- URL inputTEXTAREA- Multi-line text inputMULTIPLE_CHOICE- Radio buttonsCHECKBOXES- Checkbox groupDROPDOWN- Dropdown selectLINEAR_SCALE- Scale ratingRATING- Star ratingFILE_UPLOAD- File uploadSIGNATURE- Signature fieldPAYMENT- Payment fieldHIDDEN_FIELDS- Hidden fields
Note: Block uuid and groupUuid must be valid UUIDs (GUIDs).
Update Form
PATCH /tally/forms/{formId}
Content-Type: application/json
{
"name": "Updated Form Name",
"status": "PUBLISHED"
}
PATCH /tally/forms/{formId}
Content-Type: application/json
{
"name": "Updated Form Name",
"status": "PUBLISHED"
}
Status Values:
DRAFT- Form is a draftPUBLISHED- Form is live
Delete Form
DELETE /tally/forms/{formId}
DELETE /tally/forms/{formId}
Moves the form to trash.
Form Questions
List Questions
GET /tally/forms/{formId}/questions
Response:
{
"questions": [
{
"uuid": "33333333-3333-3333-3333-333333333333",
"type": "INPUT_TEXT",
"title": "Your name"
}
],
"hasResponses": true
}
Form Submissions
List Submissions
GET /tally/forms/{formId}/submissions
Query Parameters:
page- Page number (default: 1)limit- Items per page (default: 50)startDate- Filter by start date (ISO 8601)endDate- Filter by end date (ISO 8601)afterId- Get submissions after this ID (cursor pagination)
Response:
{
"page": 1,
"limit": 50,
"hasMore": false,
"totalNumberOfSubmissionsPerFilter": {
"all": 42,
"completed": 40,
"partial": 2
},
"questions": [
{
"uuid": "33333333-3333-3333-3333-333333333333",
"type": "INPUT_TEXT",
"title": "Your name"
}
],
"submissions": [
{
"id": "sub123",
"respondentId": "resp456",
"formId": "GxdRaQ",
"createdAt": "2026-02-09T10:00:00.000Z",
"isCompleted": true,
"responses": [
{
"questionId": "33333333-3333-3333-3333-333333333333",
"value": "John Doe"
}
]
}
]
}
Get Submission
GET /tally/forms/{formId}/submissions/{submissionId}
Delete Submission
DELETE /tally/forms/{formId}/submissions/{submissionId}
Workspaces
List Workspaces
GET /tally/workspaces
GET /tally/forms/{formId}/submissions/{submissionId}
DELETE /tally/forms/{formId}/submissions/{submissionId}
Workspaces
List Workspaces
GET /tally/workspaces
Response:
{
"items": [
{
"id": "3jW9Q1",
"name": "My Workspace",
"createdByUserId": "w2lBkb",
"createdAt": "2026-02-09T08:35:53.000Z",
"updatedAt": "2026-02-09T08:35:53.000Z"
}
],
"page": 1,
"limit": 50,
"total": 1,
"hasMore": false
}
Get Workspace
GET /tally/workspaces/{workspaceId}
GET /tally/workspaces/{workspaceId}
Response:
{
"id": "3jW9Q1",
"name": "My Workspace",
"createdByUserId": "w2lBkb",
"createdAt": "2026-02-09T08:35:53.000Z",
"members": [
{
"id": "w2lBkb",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com"
}
]
}
Create Workspace
POST /tally/workspaces
Content-Type: application/json
{
"name": "New Workspace"
}
POST /tally/workspaces
Content-Type: application/json
{
"name": "New Workspace"
}
Note: Creating workspaces requires a Pro subscription.
Update Workspace
PATCH /tally/workspaces/{workspaceId}
Content-Type: application/json
{
"name": "Updated Workspace Name"
}
Delete Workspace
DELETE /tally/workspaces/{workspaceId}
PATCH /tally/workspaces/{workspaceId}
Content-Type: application/json
{
"name": "Updated Workspace Name"
}
DELETE /tally/workspaces/{workspaceId}
Moves the workspace and all its forms to trash.
Organization Users
Admin scope. User removal permanently revokes a member's access to the organization. Confirm the user's name, email, and intent with the user before executing DELETE operations.
List Users
Admin scope. User removal permanently revokes a member's access to the organization. Confirm the user's name, email, and intent with the user before executing DELETE operations.
GET /tally/organizations/{organizationId}/users
Response:
[
{
"id": "w2lBkb",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"createdAt": "2026-02-07T20:58:54.000Z"
}
]
Remove User
DELETE /tally/organizations/{organizationId}/users/{userId}
Organization Invites
Admin scope. Creating invites grants new users access to the organization. Cancelling invites revokes pending access. Confirm the email and intent before executing.
List Invites
GET /tally/organizations/{organizationId}/invites
Create Invite
POST /tally/organizations/{organizationId}/invites
Content-Type: application/json
{
"email": "newuser@example.com",
"workspaceIds": ["3jW9Q1"]
}
Cancel Invite
DELETE /tally/organizations/{organizationId}/invites/{inviteId}
Webhooks
Data transmission. Webhooks send form submission data to the specified external URL. Submissions may contain personal or sensitive respondent information. Confirm the destination URL, form, and event types with the user before creating or updating.
List Webhooks
GET /tally/webhooks
DELETE /tally/organizations/{organizationId}/users/{userId}
Admin scope. Creating invites grants new users access to the organization. Cancelling invites revokes pending access. Confirm the email and intent before executing.
List Invites
GET /tally/organizations/{organizationId}/invites
POST /tally/organizations/{organizationId}/invites
Content-Type: application/json
{
"email": "newuser@example.com",
"workspaceIds": ["3jW9Q1"]
}
Cancel Invite
DELETE /tally/organizations/{organizationId}/invites/{inviteId}
Webhooks
Data transmission. Webhooks send form submission data to the specified external URL. Submissions may contain personal or sensitive respondent information. Confirm the destination URL, form, and event types with the user before creating or updating.
List Webhooks
GET /tally/webhooks
DELETE /tally/organizations/{organizationId}/invites/{inviteId}
Data transmission. Webhooks send form submission data to the specified external URL. Submissions may contain personal or sensitive respondent information. Confirm the destination URL, form, and event types with the user before creating or updating.
List Webhooks
GET /tally/webhooks
Note: Listing webhooks may require specific permissions.
Create Webhook
POST /tally/webhooks
Content-Type: application/json
{
"formId": "GxdRaQ",
"url": "https://example.com/webhook",
"eventTypes": ["FORM_RESPONSE"]
}
POST /tally/webhooks
Content-Type: application/json
{
"formId": "GxdRaQ",
"url": "https://example.com/webhook",
"eventTypes": ["FORM_RESPONSE"]
}
Webhook Event Types:
FORM_RESPONSE- Triggered when a new form response is submitted
Update Webhook
PATCH /tally/webhooks/{webhookId}
Content-Type: application/json
{
"url": "https://new-endpoint.com/webhook"
}
Delete Webhook
DELETE /tally/webhooks/{webhookId}
List Webhook Events
GET /tally/webhooks/{webhookId}/events
Retry Webhook Event
POST /tally/webhooks/{webhookId}/events/{eventId}
Pagination
PATCH /tally/webhooks/{webhookId}
Content-Type: application/json
{
"url": "https://new-endpoint.com/webhook"
}
DELETE /tally/webhooks/{webhookId}
List Webhook Events
GET /tally/webhooks/{webhookId}/events
Retry Webhook Event
POST /tally/webhooks/{webhookId}/events/{eventId}
Pagination
GET /tally/webhooks/{webhookId}/events
POST /tally/webhooks/{webhookId}/events/{eventId}
Pagination
Tally uses page-based pagination:
GET /tally/forms?page=1&limit=50
Response includes pagination info:
{
"items": [...],
"page": 1,
"limit": 50,
"total": 100,
"hasMore": true
}
For submissions, cursor-based pagination is also available using afterId.
Code Examples
JavaScript
const response = await fetch(
'https://api.maton.ai/tally/forms',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`,
'User-Agent': 'Maton/1.0'
}
}
);
const data = await response.json();
console.log(data.items);
Python
import os
import requests
response = requests.get(
'https://api.maton.ai/tally/forms',
headers={
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'User-Agent': 'Maton/1.0'
}
)
data = response.json()
print(data['items'])
Create Form and Get Submissions
import os
import requests
import uuid
headers = {
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'User-Agent': 'Maton/1.0'
}
# Create a simple form
form_data = {
'status': 'DRAFT',
'blocks': [
{
'type': 'FORM_TITLE',
'uuid': str(uuid.uuid4()),
'groupUuid': str(uuid.uuid4()),
'groupType': 'FORM_TITLE',
'title': 'Contact Form',
'payload': {}
},
{
'type': 'INPUT_EMAIL',
'uuid': str(uuid.uuid4()),
'groupUuid': str(uuid.uuid4()),
'groupType': 'INPUT_EMAIL',
'title': 'Your email',
'payload': {}
}
]
}
response = requests.post(
'https://api.maton.ai/tally/forms',
headers=headers,
json=form_data
)
form = response.json()
print(f"Created form: {form['id']}")
# Get submissions for a form
response = requests.get(
f'https://api.maton.ai/tally/forms/{form["id"]}/submissions',
headers=headers
)
submissions = response.json()
print(f"Total submissions: {submissions['totalNumberOfSubmissionsPerFilter']['all']}")
Notes
- Form and workspace IDs are short alphanumeric strings (e.g.,
GxdRaQ)
- Block
uuid and groupUuid fields must be valid UUIDs (GUIDs)
- Creating workspaces requires a Pro subscription
- The API is in public beta and subject to changes
- Rate limit: 100 requests per minute
- Use webhooks instead of polling for real-time submission notifications
- IMPORTANT: When piping curl output to
jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments
Error Handling
Status
Meaning
400
Missing Tally connection or validation error
401
Invalid or missing Maton API key
403
Insufficient permissions
404
Resource not found
429
Rate limited (100 req/min)
4xx/5xx
Passthrough error from Tally 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
tally. For example:
- Correct:
https://api.maton.ai/tally/forms
- Incorrect:
https://api.maton.ai/forms
Resources
import os
import requests
response = requests.get(
'https://api.maton.ai/tally/forms',
headers={
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'User-Agent': 'Maton/1.0'
}
)
data = response.json()
print(data['items'])
import os
import requests
import uuid
headers = {
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'User-Agent': 'Maton/1.0'
}
# Create a simple form
form_data = {
'status': 'DRAFT',
'blocks': [
{
'type': 'FORM_TITLE',
'uuid': str(uuid.uuid4()),
'groupUuid': str(uuid.uuid4()),
'groupType': 'FORM_TITLE',
'title': 'Contact Form',
'payload': {}
},
{
'type': 'INPUT_EMAIL',
'uuid': str(uuid.uuid4()),
'groupUuid': str(uuid.uuid4()),
'groupType': 'INPUT_EMAIL',
'title': 'Your email',
'payload': {}
}
]
}
response = requests.post(
'https://api.maton.ai/tally/forms',
headers=headers,
json=form_data
)
form = response.json()
print(f"Created form: {form['id']}")
# Get submissions for a form
response = requests.get(
f'https://api.maton.ai/tally/forms/{form["id"]}/submissions',
headers=headers
)
submissions = response.json()
print(f"Total submissions: {submissions['totalNumberOfSubmissionsPerFilter']['all']}")
Notes
- Form and workspace IDs are short alphanumeric strings (e.g.,
GxdRaQ)
- Block
uuid and groupUuid fields must be valid UUIDs (GUIDs)
- Creating workspaces requires a Pro subscription
- The API is in public beta and subject to changes
- Rate limit: 100 requests per minute
- Use webhooks instead of polling for real-time submission notifications
- IMPORTANT: When piping curl output to
jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments
Error Handling
Status
Meaning
400
Missing Tally connection or validation error
401
Invalid or missing Maton API key
403
Insufficient permissions
404
Resource not found
429
Rate limited (100 req/min)
4xx/5xx
Passthrough error from Tally 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
GxdRaQ)uuid and groupUuid fields must be valid UUIDs (GUIDs)jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments| Status | Meaning |
|---|---|
| 400 | Missing Tally connection or validation error |
| 401 | Invalid or missing Maton API key |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 429 | Rate limited (100 req/min) |
| 4xx/5xx | Passthrough error from Tally 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
tally. For example:
- Correct:
https://api.maton.ai/tally/forms - Incorrect:
https://api.maton.ai/forms
Resources
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。