账户

创建 API 密钥

POST/api/me/api-keys

为当前用户创建命名 API 密钥并返回其密钥值。仅适用于自托管安装。

Headers

NameTypeDescription
AuthorizationrequiredstringAuthentication credentials, e.g. Bearer <token>.

Request body

NameTypeDescription
namerequiredanyDisplay name of the resource.
Example request

Responses

200The operation completed successfully.
NameTypeDescription
createdAtrequiredstringDate and time the record was created.
idrequiredstringUnique identifier of the resource.
keyrequiredstring
keyPrefixrequiredstringVisible prefix used to identify an API key.
namerequiredstringDisplay name of the resource.
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
401 example
404Not found.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
404 example

Code samples

cURL