简介
Maton 官方提供的 Cognito Forms API 集成技能,通过托管 OAuth 实现表单数据管理,适合需要自动化表单处理的企业用户。
原始描述
Cognito Forms API integration with managed OAuth. Access forms, entries, and documents. Use this skill when users want to create, read, update, or delete form entries, or retrieve form submissions. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
通过你的 Agent 添加
安装目录:cognito-forms/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
cognito-forms 是一个 API 文档型 Skill,提供 Cognito Forms 第三方表单服务的完整集成指南。用户通过 Maton API Gateway 代理访问 Cognito Forms 原生 API,实现表单的创建、读取、更新、删除(CRUD)操作,以及文档生成和文件管理。核心工作流包括:获取 Maton API Key → 创建 OAuth 连接 → 通过网关调用 Cognito Forms API。
显著优点
- 托管 OAuth 简化认证:无需自行处理复杂的 OAuth 2.0 流程,Maton 网关自动注入令牌
- 完整功能覆盖:支持表单管理、条目操作、文档生成、文件下载等全量 API 能力
- 多语言示例:提供 Python、JavaScript、Bash 等丰富的代码示例,降低接入门槛
- 连接管理灵活:支持多连接切换、状态查询、动态指定连接 ID
- 标准 REST 接口:遵循 RESTful 设计,PATCH 更新、嵌套对象等符合现代 API 规范
潜在缺点与局限性
- 功能依赖第三方网关:所有请求必须通过 Maton 网关中转,存在单点依赖风险
- 无批量条目查询:Cognito Forms API 本身不支持批量列出所有条目,需借助 Webhook 或 OData 同步
- 付费功能限制:表单列表等功能可能受 Cognito Forms 订阅计划限制
- 更新操作受限:包含付费订单的条目无法通过 API 更新
- 速率限制:100 请求/60 秒的限流对高频场景可能不足
适合的目标群体
- 需要将 Cognito Forms 集成到内部工作流的开发团队
- 使用 Python/JavaScript 进行自动化表单处理的数据工程师
- 希望通过 API 批量管理表单条目的运营人员
- 需要基于表单数据自动生成 PDF 文档的业务场景
使用风险
- 供应链风险:Maton 网关服务稳定性直接影响 Skill 可用性
- 数据隐私:表单数据经第三方网关中转,需评估数据敏感度
- 密钥安全:MATON_API_KEY 泄露可能导致 Cognito Forms 数据被非法访问
- OAuth 会话管理:连接过期或失效需手动重新授权,可能影响自动化流程连续性
- 功能依赖第三方网关:所有请求必须通过 Maton 网关中转,存在单点依赖风险
- 无批量条目查询:Cognito Forms API 本身不支持批量列出所有条目,需借助 Webhook 或 OData 同步
- 付费功能限制:表单列表等功能可能受 Cognito Forms 订阅计划限制
- 更新操作受限:包含付费订单的条目无法通过 API 更新
- 速率限制:100 请求/60 秒的限流对高频场景可能不足
适合的目标群体
- 需要将 Cognito Forms 集成到内部工作流的开发团队
- 使用 Python/JavaScript 进行自动化表单处理的数据工程师
- 希望通过 API 批量管理表单条目的运营人员
- 需要基于表单数据自动生成 PDF 文档的业务场景
使用风险
- 供应链风险:Maton 网关服务稳定性直接影响 Skill 可用性
- 数据隐私:表单数据经第三方网关中转,需评估数据敏感度
- 密钥安全:MATON_API_KEY 泄露可能导致 Cognito Forms 数据被非法访问
- OAuth 会话管理:连接过期或失效需手动重新授权,可能影响自动化流程连续性
- 供应链风险:Maton 网关服务稳定性直接影响 Skill 可用性
- 数据隐私:表单数据经第三方网关中转,需评估数据敏感度
- 密钥安全:MATON_API_KEY 泄露可能导致 Cognito Forms 数据被非法访问
- OAuth 会话管理:连接过期或失效需手动重新授权,可能影响自动化流程连续性
技能正文
name: cognito-forms
description: |
Cognito Forms API integration with managed OAuth. Access forms, entries, and documents.
Use this skill when users want to create, read, update, or delete form entries, or retrieve form submissions.
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: 🧠
requires:
env:
- MATON_API_KEY
Cognito Forms
Access the Cognito Forms API with managed OAuth authentication. List forms, manage entries (create, read, update, delete), and retrieve documents.
Quick Start
# List all forms
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/cognito-forms/api/forms')
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://gateway.maton.ai/cognito-forms/{native-api-path}
# List all forms
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/cognito-forms/api/forms')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://gateway.maton.ai/cognito-forms/{native-api-path}
Replace {native-api-path} with the actual Cognito Forms API endpoint path (starting with api/). The gateway proxies requests to www.cognitoforms.com 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 Cognito Forms OAuth connections at https://ctrl.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=cognito-forms&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': 'cognito-forms'}).encode()
req = urllib.request.Request('https://ctrl.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://ctrl.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://ctrl.maton.ai/connections?app=cognito-forms&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': 'cognito-forms'}).encode()
req = urllib.request.Request('https://ctrl.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://ctrl.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://ctrl.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": "77de1a60-5f69-45fc-977c-9dfffe7a64d4",
"status": "ACTIVE",
"creation_time": "2026-02-08T10:39:10.245446Z",
"last_updated_time": "2026-02-09T04:11:08.342101Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "cognito-forms",
"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://ctrl.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://ctrl.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 Cognito Forms connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/cognito-forms/api/forms')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '77de1a60-5f69-45fc-977c-9dfffe7a64d4')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If omitted, the gateway uses the default (oldest) active connection.
API Reference
Forms
List Forms
GET /cognito-forms/api/forms
GET /cognito-forms/api/forms
Returns all forms in the organization.
Entries
Get Entry
GET /cognito-forms/api/forms/{formId}/entries/{entryId}
Returns a specific entry by ID or entry number.
Create Entry
POST /cognito-forms/api/forms/{formId}/entries
Content-Type: application/json
{
"Name": {
"First": "John",
"Last": "Doe"
},
"Email": "john.doe@example.com",
"Phone": "555-1234"
}
POST /cognito-forms/api/forms/{formId}/entries
Content-Type: application/json
{
"Name": {
"First": "John",
"Last": "Doe"
},
"Email": "john.doe@example.com",
"Phone": "555-1234"
}
Field names match your form's field names. Complex fields like Name and Address use nested objects.
Update Entry
PATCH /cognito-forms/api/forms/{formId}/entries/{entryId}
Content-Type: application/json
{
"Name": {
"First": "Jane",
"Last": "Doe"
},
"Email": "jane.doe@example.com"
}
PATCH /cognito-forms/api/forms/{formId}/entries/{entryId}
Content-Type: application/json
{
"Name": {
"First": "Jane",
"Last": "Doe"
},
"Email": "jane.doe@example.com"
}
Updates an existing entry. Uses PATCH method (not PUT). Fails if the entry includes a paid order.
Delete Entry
DELETE /cognito-forms/api/forms/{formId}/entries/{entryId}
DELETE /cognito-forms/api/forms/{formId}/entries/{entryId}
Deletes an entry. Requires Read/Write/Delete API scope.
Documents
Get Document
GET /cognito-forms/api/forms/{formId}/entries/{entryId}/documents/{templateNumber}
Generates and returns a document from an entry using the specified template number.
Response:
{
"Id": "abc123",
"Name": "Entry-Document.pdf",
"ContentType": "application/pdf",
"Size": 12345,
"File": "https://temporary-download-url..."
}
Files
Get File
GET /cognito-forms/api/files/{fileId}
Retrieves a file uploaded to a form entry.
Response:
{
"Id": "file-id",
"Name": "upload.pdf",
"ContentType": "application/pdf",
"Size": 54321,
"File": "https://temporary-download-url..."
}
Field Format Examples
Name Fields
{
"Name": {
"First": "John",
"Last": "Doe"
}
}
Address Fields
{
"Address": {
"Line1": "123 Main St",
"Line2": "Suite 100",
"City": "San Francisco",
"State": "CA",
"PostalCode": "94105"
}
}
Choice Fields
{
"Address": {
"Line1": "123 Main St",
"Line2": "Suite 100",
"City": "San Francisco",
"State": "CA",
"PostalCode": "94105"
}
}
Single choice:
{
"PreferredContact": "Email"
}
Multiple choice:
{
"Interests": ["Sports", "Music", "Travel"]
}
Code Examples
JavaScript
const response = await fetch(
'https://gateway.maton.ai/cognito-forms/api/forms',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const forms = await response.json();
Python
import os
import requests
response = requests.get(
'https://gateway.maton.ai/cognito-forms/api/forms',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
forms = response.json()
Create Entry Example (Python)
import os
import requests
entry_data = {
"Name": {"First": "John", "Last": "Doe"},
"Email": "john@example.com",
"Message": "Hello from the API!"
}
response = requests.post(
'https://gateway.maton.ai/cognito-forms/api/forms/ContactForm/entries',
headers={
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'Content-Type': 'application/json'
},
json=entry_data
)
Notes
- List Entries: The Cognito Forms API does not support bulk listing of all entries. Use webhooks or OData for syncing entries.
- Get Form: Returns 404 - use List Forms to get form information instead.
- Form Availability: This endpoint may not be available depending on your Cognito Forms plan.
- Entry IDs can be either the entry number or entry ID (format:
{formId}-{entryNumber})
- Complex fields (Name, Address) use nested JSON objects
- File uploads return temporary download URLs
- Document generation creates PDFs from form templates
- API scopes control access: Read, Read/Write, or Read/Write/Delete
- IMPORTANT: When using curl commands, use
curl -g when URLs contain brackets to disable glob parsing
- 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 Cognito Forms connection
401
Invalid or missing Maton API key
404
Form or entry not found
429
Rate limited (100 requests per 60 seconds)
4xx/5xx
Passthrough error from Cognito Forms 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://ctrl.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
cognito-forms. For example:
- Correct:
https://gateway.maton.ai/cognito-forms/api/forms
- Incorrect:
https://gateway.maton.ai/api/forms
Resources
import os
import requests
response = requests.get(
'https://gateway.maton.ai/cognito-forms/api/forms',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
forms = response.json()
import os
import requests
entry_data = {
"Name": {"First": "John", "Last": "Doe"},
"Email": "john@example.com",
"Message": "Hello from the API!"
}
response = requests.post(
'https://gateway.maton.ai/cognito-forms/api/forms/ContactForm/entries',
headers={
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'Content-Type': 'application/json'
},
json=entry_data
)
Notes
- List Entries: The Cognito Forms API does not support bulk listing of all entries. Use webhooks or OData for syncing entries.
- Get Form: Returns 404 - use List Forms to get form information instead.
- Form Availability: This endpoint may not be available depending on your Cognito Forms plan.
- Entry IDs can be either the entry number or entry ID (format:
{formId}-{entryNumber})
- Complex fields (Name, Address) use nested JSON objects
- File uploads return temporary download URLs
- Document generation creates PDFs from form templates
- API scopes control access: Read, Read/Write, or Read/Write/Delete
- IMPORTANT: When using curl commands, use
curl -g when URLs contain brackets to disable glob parsing
- 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 Cognito Forms connection
401
Invalid or missing Maton API key
404
Form or entry not found
429
Rate limited (100 requests per 60 seconds)
4xx/5xx
Passthrough error from Cognito Forms 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://ctrl.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
{formId}-{entryNumber})curl -g when URLs contain brackets to disable glob parsingjq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments| Status | Meaning |
|---|---|
| 400 | Missing Cognito Forms connection |
| 401 | Invalid or missing Maton API key |
| 404 | Form or entry not found |
| 429 | Rate limited (100 requests per 60 seconds) |
| 4xx/5xx | Passthrough error from Cognito Forms 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://ctrl.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
cognito-forms. For example:
- Correct:
https://gateway.maton.ai/cognito-forms/api/forms - Incorrect:
https://gateway.maton.ai/api/forms
Resources
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。