用户 API
检索已认证用户的个人资料和账户信息。
用户 API 提供对已认证用户个人资料和账户详情的访问。
所有响应体均使用 snake_case 字段命名。
Endpoints
获取个人资料
GET
/api/v1/user返回当前已认证用户的个人资料和账户信息。
响应字段
idstring唯一用户 ID
emailstring用户邮箱地址
first_namestring or null用户名
last_namestring or null用户姓
language_preferencestring首选语言代码(默认:"en")
created_atstringISO 8601 账户创建时间戳
updated_atstringISO 8601 最后更新时间戳
plan_tierstring当前套餐:"entrepreneur"、"pro" 或 "business"
subscription_statusstring or nullStripe 订阅状态(例如 "active"、"past_due"、"canceled")
current_period_endstring or nullISO 8601 当前计费周期结束日期
storage_used_bytesinteger已使用的文件存储总量(字节)
subdomainstring or null自定义子域名(例如 "acme" 对应 acme.nueform.io)。Pro 套餐及以上。
custom_domainstring or null自定义域名(例如 "forms.acme.com")。Pro 套餐及以上。
custom_domain_verified_atstring or nullISO 8601 自定义域名验证时间戳。待验证时为 null。
响应
json
{
"id": "665a0a1b2c3d4e5f6a7b8c9d",
"email": "alice@example.com",
"first_name": "Alice",
"last_name": "Johnson",
"language_preference": "en",
"created_at": "2025-11-01T10:00:00.000Z",
"updated_at": "2026-02-28T08:15:00.000Z",
"plan_tier": "pro",
"subscription_status": "active",
"current_period_end": "2026-03-15T00:00:00.000Z",
"storage_used_bytes": 52428800,
"subdomain": "acme",
"custom_domain": "forms.acme.com",
"custom_domain_verified_at": "2026-01-20T14:30:00.000Z"
}
代码示例
bash
curl -X GET "https://api.nueform.io/api/v1/user" \
-H "Authorization: Bearer YOUR_API_KEY"
错误响应
此端点返回的标准错误响应。
错误码
401Unauthorized缺少或无效的 API 密钥
404Not Found用户未找到
500Server Error服务器内部错误
错误示例
json
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key",
"status": 401
}
}
最后更新:2026年4月6日