API 参考认证
创建用户密钥
需要登录会话:API 密钥不能签发密钥,因此泄露密钥不能通过新密钥逃避撤销。
POST
/api/v1/users/me/keys需要登录会话:API 密钥不能签发密钥,因此泄露密钥不能通过新密钥逃避撤销。
认证与授权Bearer <token>
工作空间 API 密钥(a13n_...)
传递位置: header
请求体
application/json
TypeScript 类型定义
在 TypeScript 中使用 request body 类型。
响应体
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/users/me/keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "workspace_id": "string" }'{ "key": { "created_at": "2019-08-24T14:15:22Z", "created_by_id": "string", "expires_at": "2019-08-24T14:15:22Z", "id": "string", "last_used_at": "2019-08-24T14:15:22Z", "name": "string", "organization_id": "string", "principal": { "email": "string", "id": "string", "image_url": "string", "kind": "string", "name": "string", "status": "string" }, "revoked_at": "2019-08-24T14:15:22Z", "version": 0, "workspace_id": "string" }, "secret": "string"}