身份验证
所有 API 请求需要在 Authorization header 中传入 API 密钥。在以下位置生成密钥: Authorization 设置 → API 密钥.
curl https://portplate.com/api/designs \ -H "Authorization: Bearer pp_your_api_key_here"
基础 URL
https://portplate.com/api
接口
设计
GET
/api/designs获取设计列表(分页,?limit=20&offset=0)
POST
/api/designs创建新设计
GET
/api/designs/:id通过 ID 获取设计
PATCH
/api/designs/:id更新标题、标签或可见性
DELETE
/api/designs/:id将设计移至回收站
导出
POST
/api/exports为设计排队 PNG/PDF 导出
GET
/api/exports/:id查看导出状态和下载链接
模板
GET
/api/templates获取公开模板列表
GET
/api/templates/:id获取模板详情
示例:获取设计列表
curl "https://portplate.com/api/designs?limit=5" \
-H "Authorization: Bearer pp_your_key"
# Response
{
"designs": [
{
"_id": "64ab1234...",
"title": "My Design",
"width": 1080,
"height": 1080,
"updatedAt": "2026-04-01T10:00:00Z"
}
],
"total": 42
}示例:从模板创建设计
curl -X POST "https://portplate.com/api/designs" \
-H "Authorization: Bearer pp_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Product Promo",
"width": 1080,
"height": 1080,
"fromTemplate": "TEMPLATE_ID"
}'速率限制
Free60 requests / minute
Pro300 requests / minute
Max1,000 requests / minute
速率限制状态在 X-RateLimit-* header 中返回。