POST /auth/api-keys

创建新的 API Key,返回原始 Key 仅一次

API Key `bearerAuth` application/json

请求体

Schema: service-identity/internal/handler/dto.CreateApiKeyRequest

字段类型必填示例约束描述
name string 是
environment string 否 enum: `live`, `test`
expires_at string 否
scopes array of

string

否

响应

状态描述Schema
201创建成功,返回原始 Key(仅此一次)

引用的 Schema

service-identity/internal/handler/dto.CreateApiKeyResponse

字段类型必填示例约束描述
created_at string 否
environment string 否
expires_at string 否
id string 否
name string 否
raw_key string 否
scopes array of

string

否
status string 否

service-identity/internal/handler/dto.DataResponse

字段类型必填示例约束描述
code integer 否
data object 否
message string 否