UserAPIKeyService

UpdateAPIKey 单接口聚合更新,仅传需要变更的字段;nil 字段不修改。

patch/v1/me/apikeys/{id}

Path parameters

idstring required

Request body

channelSourceIdstring
expiresAtstring date-time
hasChannelSourceIdboolean

channel_source_id: has_channel_source_id=false 不修改;has_channel_source_id=true && channel_source_id=0 表示解绑。

hasExpiresAtboolean

expires_at: has_expires_at=false 不修改;has_expires_at=true && expires_at=nil 表示永久。

hasScopesboolean

scopes 为空切片 = 清空;nil 字段(未传)= 不更新。 这里用 has_scopes 显式区分。

idstring
namestring

使用 wrapper-style:proto3 默认值无法区分"未传"与"清空",因此用 optional 标记,需要明确传 nil 才不更新。

scopesstring[]

Response

OK

Changes

No recorded changes to this endpoint across all 1 revision of this API.