方法路径摘要认证
GET/v1/account/api-keysList API keys owned by the current tenant user登录会话
POST/v1/account/api-keysCreate and activate an API key for the current tenant user登录会话
GET/v1/account/api-keys/{key_id}Get API key metadata owned by the current tenant user登录会话
PATCH/v1/account/api-keys/{key_id}Update API key metadata登录会话
POST/v1/account/api-keys/{key_id}/activateActivate a pending API key and issue its secret登录会话
POST/v1/account/api-keys/{key_id}/revokeRevoke an API key登录会话
POST/v1/account/api-keys/{key_id}/rotateRotate an active API key secret登录会话
GET/v1/account/balanceRead the active tenant CNY balance登录会话
GET/v1/account/inboxList the tenant member's in-app messages (站内信), newest first登录会话
POST/v1/account/inbox/read-allMark all the caller's in-app messages read (audited admin.inbox.read_all); read messages older than 180 days are pruned登录会话
GET/v1/account/inbox/unread-countUnread message count for the header badge登录会话
POST/v1/account/inbox/{message_id}/readMark one message read登录会话
GET/v1/account/ledgerList immutable entries for the active tenant CNY balance登录会话
GET/v1/account/messagesList the current user's in-app messages登录会话
POST/v1/account/messages/{event_id}/deliveredMark an in-app message delivered登录会话
POST/v1/account/messages/{event_id}/readMark an in-app message read登录会话
GET/v1/account/mfaRead the authenticated account's current MFA state登录会话
POST/v1/account/mfa/disableDisable active MFA after strong reauthentication登录会话
POST/v1/account/mfa/enrollmentsBegin TOTP enrollment登录会话
POST/v1/account/mfa/enrollments/{credential_id}/activateActivate a pending TOTP credential登录会话
POST/v1/account/mfa/resetReset active MFA after strong reauthentication登录会话
POST/v1/account/mfa/step-up-proofsCreate a short-lived bound step-up proof登录会话
GET/v1/account/notification-messagesList the current user's own event messages登录会话
GET/v1/account/notification-subscriptions/{event_type}Read the current user's event subscription登录会话
PUT/v1/account/notification-subscriptions/{event_type}Update the current user's event subscription登录会话
GET/v1/account/ordersList tenant consumption records登录会话
POST/v1/account/passwordRe-authenticate and change the current tenant user's password登录会话
GET/v1/account/profileGet the current tenant user's profile登录会话
PATCH/v1/account/profileUpdate the current tenant user's profile登录会话
GET/v1/account/statementList the caller's merged consumption statement (orders, recharges and balance ledger entries)登录会话

契约文件:api/openapi/v1/control.yaml api/control-announcements.openapi.yaml api/control-mfa.openapi.yaml api/control-notifications.openapi.yaml api/control-account-orders.openapi.yaml

接口详情

GET /v1/account/api-keys

List API keys owned by the current tenant user

operationId
listSelfAPIKeys
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint requiring api_keys.self.manage. CdncaKey credentials are rejected. Each item includes the exact persisted IP allowlist; secret material is never returned.

参数

listSelfAPIKeys 参数
名称位置类型必填说明
limitqueryinteger否—
statusquerystring: pending_activation / active / revoked否—
namequerystring否—
key_idquerystring否—
cursorquerystring否—
offsetqueryinteger否Page-number access (canonical non-negative integer, 0-10000). Cannot be combined with cursor; an offset past the end returns empty items with total.
usablequerystring: true否Only `true` is accepted. Keeps keys that can authenticate at the page snapshot: status active and expires_at absent or later than snapshot_at. An expired key keeps its active lifecycle status as history, so status=active alone does not mean usable. Combinable only with status=active or no status. Clients judge expiry against the response Date header (server clock), not their own clock.

响应

listSelfAPIKeys 响应
状态码说明
200API key metadata only; secret material is never returned.

字段:items: array<APIKey> next_cursor: string has_more: boolean total?: integer

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/api-keys

Create and activate an API key for the current tenant user

operationId
createSelfAPIKey
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint requiring api_keys.self.manage. The secret is returned in this response only. A replay with the same identity, request, and Idempotency-Key deterministically returns the same secret. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

createSelfAPIKey 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是—
If-Matchheaderstring是Collection creation precondition. Must be the quoted revision zero value.

请求体

application/json · 必填:是

createSelfAPIKey 请求体
名称类型必填说明
namestring是—
scopesarray<string>是—
ip_allowlistarray<string>否Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
expires_atstring(date-time)否Must be in the future and no more than 366 days from the server clock.

响应

createSelfAPIKey 响应
状态码说明
201Active key and its one-time secret.

字段:key: APIKey secret: string(password)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/api-keys/{key_id}

Get API key metadata owned by the current tenant user

operationId
getSelfAPIKey
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint requiring api_keys.self.manage. The exact persisted IP allowlist is returned; secret material is never returned.

参数

getSelfAPIKey 参数
名称位置类型必填说明
key_idpathstring(uuid)是—

响应

getSelfAPIKey 响应
状态码说明
200Current API key metadata.

字段:id: string(uuid) key_id: string key_prefix: string scope_id: string(uuid) tenant_id: string(uuid) user_id: string(uuid) name: string scopes: array<string> unavailable_scopes?: array<string> ip_allowlist: array<string> status: string: pending_activation / active / revoked pending_expires_at?: string(date-time) expires_at?: string(date-time) last_used_at?: string(date-time) activated_at?: string(date-time) revoked_at?: string(date-time) revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PATCH /v1/account/api-keys/{key_id}

Update API key metadata

operationId
updateSelfAPIKey
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint. Revoked keys cannot be updated. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

updateSelfAPIKey 参数
名称位置类型必填说明
key_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

updateSelfAPIKey 请求体
名称类型必填说明
namestring是—
scopesarray<string>是—
ip_allowlistarray<string>否Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
expires_atstring(date-time)否Must be in the future and no more than 366 days from the server clock.

响应

updateSelfAPIKey 响应
状态码说明
200Updated metadata.

字段:id: string(uuid) key_id: string key_prefix: string scope_id: string(uuid) tenant_id: string(uuid) user_id: string(uuid) name: string scopes: array<string> unavailable_scopes?: array<string> ip_allowlist: array<string> status: string: pending_activation / active / revoked pending_expires_at?: string(date-time) expires_at?: string(date-time) last_used_at?: string(date-time) activated_at?: string(date-time) revoked_at?: string(date-time) revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/api-keys/{key_id}/activate

Activate a pending API key and issue its secret

operationId
activateSelfAPIKey
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint for the key owner. Only an unexpired pending_activation key can be activated; the secret is returned in this response only. The body carries the exact persisted IP allowlist. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

activateSelfAPIKey 参数
名称位置类型必填说明
key_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

activateSelfAPIKey 请求体
名称类型必填说明
ip_allowlistarray<string>是Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
grant_all_scopesboolean否Rotate only. When true, the rotation also replaces the key scopes with every permission the current session may grant to an API key (the simple-mode "reset key"). It is part of the idempotency binding. Other operations reject true with 400 invalid_request.

响应

activateSelfAPIKey 响应
状态码说明
200Activated key and one-time secret.

字段:key: APIKey secret: string(password)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/api-keys/{key_id}/revoke

Revoke an API key

operationId
revokeSelfAPIKey
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint. Revocation immediately prevents future API key authentication. The body carries the exact persisted IP allowlist. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

revokeSelfAPIKey 参数
名称位置类型必填说明
key_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

revokeSelfAPIKey 请求体
名称类型必填说明
ip_allowlistarray<string>是Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
grant_all_scopesboolean否Rotate only. When true, the rotation also replaces the key scopes with every permission the current session may grant to an API key (the simple-mode "reset key"). It is part of the idempotency binding. Other operations reject true with 400 invalid_request.

响应

revokeSelfAPIKey 响应
状态码说明
200Revoked key metadata.

字段:id: string(uuid) key_id: string key_prefix: string scope_id: string(uuid) tenant_id: string(uuid) user_id: string(uuid) name: string scopes: array<string> unavailable_scopes?: array<string> ip_allowlist: array<string> status: string: pending_activation / active / revoked pending_expires_at?: string(date-time) expires_at?: string(date-time) last_used_at?: string(date-time) activated_at?: string(date-time) revoked_at?: string(date-time) revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/api-keys/{key_id}/rotate

Rotate an active API key secret

operationId
rotateSelfAPIKey
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Session-only endpoint. The previous credential becomes invalid when the transaction commits. The body carries the exact persisted IP allowlist. An unknown result must be retried with the unchanged body, If-Match revision, and Idempotency-Key.

参数

rotateSelfAPIKey 参数
名称位置类型必填说明
key_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

rotateSelfAPIKey 请求体
名称类型必填说明
ip_allowlistarray<string>是Canonical network CIDRs only: no host bits, zones, IPv4-mapped IPv6, duplicate prefixes, or overlaps. Empty means unrestricted.
grant_all_scopesboolean否Rotate only. When true, the rotation also replaces the key scopes with every permission the current session may grant to an API key (the simple-mode "reset key"). It is part of the idempotency binding. Other operations reject true with 400 invalid_request.

响应

rotateSelfAPIKey 响应
状态码说明
200Updated key and one-time replacement secret.

字段:key: APIKey secret: string(password)

400Malformed JSON, UUID, revision, CIDR, duplicate or overlapping prefix, or more than 32 prefixes. Validation params expose only field indexes and counts, never any submitted CIDR, secret, digest, or matching prefix.
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
503A required dependency is unavailable.
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/balance

Read the active tenant CNY balance

operationId
getAccountBalance
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires billing.account.read in a tenant scope. A platform identity cannot use this tenant endpoint.

响应

getAccountBalance 响应
状态码说明
200Current cached balance and optimistic revision. The balance is reconstructable from immutable postings.

字段:id: string(uuid) scope_id: string(uuid) tenant_id: string(uuid) tenant_name: string currency: string balance_minor: integer(int64) available_minor: integer(int64) refunding_minor: integer(int64) revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
500服务内部故障,请求未完成。

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/inbox

List the tenant member's in-app messages (站内信), newest first

operationId
listAccountInbox
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Tenant in-app notices addressed to the caller in the session's tenant scope (attack escalation security.escalate.blackhole once the blackhole is in force, security.escalate.cname_change_required). Written whatever the platform email/SMS settings say. Tenant-scope sessions only (platform sessions use /v1/admin/inbox). params holds the event's public template values; the console renders the text per language.

参数

listAccountInbox 参数
名称位置类型必填说明
unreadquerystring: true否—
page_sizequeryinteger否—
cursorquerystring否—

响应

listAccountInbox 响应
状态码说明
200One page.

字段:items: array<object> unread: integer total: integer next_cursor: string unread_only: boolean page_size: integer

401认证失败或会话已失效。
403当前身份没有执行该操作的权限。

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。

↑ 回到列表

POST /v1/account/inbox/read-all

Mark all the caller's in-app messages read (audited admin.inbox.read_all); read messages older than 180 days are pruned

operationId
markAllAccountInboxMessagesRead
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

响应

markAllAccountInboxMessagesRead 响应
状态码说明
200Number of messages marked.

字段:marked: integer

↑ 回到列表

GET /v1/account/inbox/unread-count

Unread message count for the header badge

operationId
getAccountInboxUnreadCount
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

响应

getAccountInboxUnreadCount 响应
状态码说明
200Count.

字段:unread: integer

401认证失败或会话已失效。

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。

↑ 回到列表

POST /v1/account/inbox/{message_id}/read

Mark one message read

operationId
markAccountInboxMessageRead
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

markAccountInboxMessageRead 参数
名称位置类型必填说明
message_idpathstring(uuid)是—

响应

markAccountInboxMessageRead 响应
状态码说明
204Read.
404admin_inbox_message_not_found (not the caller's message).

失败时怎么办

  • 404 资源不存在或不属于当前租户。

↑ 回到列表

GET /v1/account/ledger

List immutable entries for the active tenant CNY balance

operationId
listAccountLedger
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires billing.account.read and always derives scope from the authenticated tenant principal.

参数

listAccountLedger 参数
名称位置类型必填说明
pagequeryinteger否—
limitqueryinteger否—

响应

listAccountLedger 响应
状态码说明
200Newest-first tenant ledger page.

字段:items: array<BillingLedgerEntry> total: integer(int64) page: integer limit: integer

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/messages

List the current user's in-app messages

operationId
listAccountMessages
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

listAccountMessages 参数
名称位置类型必填说明
limitqueryinteger否—
cursorquerystring否—
offsetqueryinteger否Page by position (page-number pagination). Cannot be combined with cursor.
filterquerystring: read / unread否—

响应

listAccountMessages 响应
状态码说明
200Inbox page

字段:items: array<InboxMessage> next_cursor?: string total?: integer

400Stable API error
401Stable API error
403Stable API error
500Stable API error

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/messages/{event_id}/delivered

Mark an in-app message delivered

operationId
markMessageDelivered
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

markMessageDelivered 参数
名称位置类型必填说明
event_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

markMessageDelivered 请求体
名称类型必填说明
expected_revisioninteger是—

响应

markMessageDelivered 响应
状态码说明
200Inbox state

字段:event_id: string(uuid) delivered_at?: string(date-time) read_at?: string(date-time) revision: integer replayed?: boolean

400Stable API error
401Stable API error
403Stable API error
404Stable API error
409Stable API error
415Stable API error
500Stable API error

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/messages/{event_id}/read

Mark an in-app message read

operationId
markMessageRead
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

markMessageRead 参数
名称位置类型必填说明
event_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
If-Matchheaderstring是—

请求体

application/json · 必填:是

markMessageRead 请求体
名称类型必填说明
expected_revisioninteger是—

响应

markMessageRead 响应
状态码说明
200Inbox state

字段:event_id: string(uuid) delivered_at?: string(date-time) read_at?: string(date-time) revision: integer replayed?: boolean

400Stable API error
401Stable API error
403Stable API error
404Stable API error
409Stable API error
415Stable API error
500Stable API error

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/mfa

Read the authenticated account's current MFA state

operationId
getMyMFAStatus
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Returns only inactive, enrollment_pending, or active plus non-sensitive credential metadata. No account label, seed, ciphertext, recovery code, or proof material is returned.

参数

getMyMFAStatus 参数
名称位置类型必填说明
X-Request-IDheaderstring是—
Traceparentheaderstring是Canonical W3C version 00 traceparent; the non-zero trace ID is used for correlation.

响应

getMyMFAStatus 响应
状态码说明
200Current non-sensitive MFA state.
400Request metadata, path, query, body, or input is invalid
401Bearer session is absent, malformed, expired, revoked, or disabled
403Live principal, tenant, permissions, or proof binding changed
405Request method is not allowed.
408Request was canceled
503MFA, encryption, identity, IAM, or PostgreSQL dependency is unavailable
504Request deadline elapsed

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/mfa/disable

Disable active MFA after strong reauthentication

operationId
disableMyMFA
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

A TOTP or unused recovery code is consumed in the same transaction as the immutable terminal fact and audit event. A same-payload Idempotency-Key retry is safe after an unknown commit result and returns 204 without re-consuming authentication evidence.

请求体

application/json · 必填:是

disableMyMFA 请求体
名称类型必填说明
authenticationAuthentication是—
reasonstring是—

响应

disableMyMFA 响应
状态码说明
204Terminal fact already exists or was committed by this request.
400Request metadata, path, query, body, or input is invalid
401Bearer session is absent, malformed, expired, revoked, or disabled
403Live principal, tenant, permissions, or proof binding changed
405Request method is not allowed.
409Idempotency, lifecycle, code replay, or bounded-use conflict
412Active MFA is required
413Request body exceeds the configured limit
422MFA code or proof is invalid
408Request was canceled
503MFA, encryption, identity, IAM, or PostgreSQL dependency is unavailable
504Request deadline elapsed

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 412 版本已变:回读最新 ETag 后重新判断,再带新的 If-Match 提交。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/mfa/enrollments

Begin TOTP enrollment

operationId
beginMyMFAEnrollment
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

A first successful response contains the seed and provisioning URI. A same-payload Idempotency-Key replay returns only credential_id, expires_at, and replayed=true; the service does not decrypt or reconstruct setup material during replay.

参数

beginMyMFAEnrollment 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是Canonical W3C version 00 traceparent; the non-zero trace ID is used for correlation.

请求体

application/json · 必填:是

beginMyMFAEnrollment 请求体
名称类型必填说明
account_labelstring是—

响应

beginMyMFAEnrollment 响应
状态码说明
201Enrollment created; secret and provisioning_uri are present exactly once.

字段:credential_id: string(uuid) secret: string provisioning_uri: string(uri) expires_at: string(date-time) replayed: const false

200Enrollment replayed; secret and provisioning_uri are absent.

字段:credential_id: string(uuid) expires_at: string(date-time) replayed: const true

400Request metadata, path, query, body, or input is invalid
401Bearer session is absent, malformed, expired, revoked, or disabled
403Live principal, tenant, permissions, or proof binding changed
405Request method is not allowed.
409Idempotency, lifecycle, code replay, or bounded-use conflict
413Request body exceeds the configured limit
408Request was canceled
503MFA, encryption, identity, IAM, or PostgreSQL dependency is unavailable
504Request deadline elapsed

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/mfa/enrollments/{credential_id}/activate

Activate a pending TOTP credential

operationId
activateMyMFAEnrollment
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Recovery codes are returned only by the first successful activation. They are omitted entirely from a same-payload Idempotency-Key replay.

参数

activateMyMFAEnrollment 参数
名称位置类型必填说明
credential_idpathstring(uuid)是—
Idempotency-Keyheaderstring是—
X-Request-IDheaderstring是—
Traceparentheaderstring是Canonical W3C version 00 traceparent; the non-zero trace ID is used for correlation.

请求体

application/json · 必填:是

activateMyMFAEnrollment 请求体
名称类型必填说明
codestring是—

响应

activateMyMFAEnrollment 响应
状态码说明
201Enrollment activated; recovery_codes are present exactly once.

字段:credential_id: string(uuid) recovery_codes: array<string> activated_at: string(date-time) replayed: const false

200Activation replayed; recovery_codes are absent.

字段:credential_id: string(uuid) activated_at: string(date-time) replayed: const true

400Request metadata, path, query, body, or input is invalid
401Bearer session is absent, malformed, expired, revoked, or disabled
403Live principal, tenant, permissions, or proof binding changed
405Request method is not allowed.
409Idempotency, lifecycle, code replay, or bounded-use conflict
410Enrollment or proof expired
413Request body exceeds the configured limit
422MFA code or proof is invalid
408Request was canceled
503MFA, encryption, identity, IAM, or PostgreSQL dependency is unavailable
504Request deadline elapsed

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/mfa/reset

Reset active MFA after strong reauthentication

operationId
resetMyMFA
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Reset has the same atomic authentication, terminal-fact, audit, idempotency, and unknown commit semantics as disable. Account recovery without a TOTP or recovery code is a separate audited workflow and is not represented by this operation.

请求体

application/json · 必填:是

resetMyMFA 请求体
名称类型必填说明
authenticationAuthentication是—
reasonstring是—

↑ 回到列表

POST /v1/account/mfa/step-up-proofs

Create a short-lived bound step-up proof

operationId
createMyMFAStepUpProof
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

The proof is bound server-side to the authenticated user, scope, session, live permissions, tenant, audience, and action. The opaque token is returned only once and is omitted from replay. There is no client-accessible proof consume operation.

请求体

application/json · 必填:是

createMyMFAStepUpProof 请求体
名称类型必填说明
tenant_idstring(uuid)是—
audiencestring是—
actionstring是—
authenticationAuthentication是—
ttl_secondsinteger是—
max_usesinteger是—

响应

createMyMFAStepUpProof 响应
状态码说明
201Step-up proof created; token is present exactly once.

字段:proof_id: string(uuid) token: string method: string: totp / recovery_code issued_at: string(date-time) expires_at: string(date-time) max_uses: integer replayed: const false

200Step-up proof replayed; token is absent.

字段:proof_id: string(uuid) method: string: totp / recovery_code issued_at: string(date-time) expires_at: string(date-time) max_uses: integer replayed: const true

400Request metadata, path, query, body, or input is invalid
401Bearer session is absent, malformed, expired, revoked, or disabled
403Live principal, tenant, permissions, or proof binding changed
405Request method is not allowed.
409Idempotency, lifecycle, code replay, or bounded-use conflict
410Enrollment or proof expired
412Active MFA is required
413Request body exceeds the configured limit
422MFA code or proof is invalid
408Request was canceled
503MFA, encryption, identity, IAM, or PostgreSQL dependency is unavailable
504Request deadline elapsed

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 412 版本已变:回读最新 ETag 后重新判断,再带新的 If-Match 提交。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/notification-messages

List the current user's own event messages

operationId
listOwnNotificationMessages
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Subscribable operational events (package, traffic, protection, certificate, site) delivered to the caller in the caller's own scope. Scope and recipient come from the session; announcements stay in the announcement inbox and system-required messages are excluded. site_id and package_id are facts recorded when the event was raised and remain after the resource is deleted.

参数

listOwnNotificationMessages 参数
名称位置类型必填说明
typequerystring否—
site_idquerystring(uuid)否—
package_idquerystring(uuid)否—
sitequerystring否Event-time site by exact display ID or case-insensitive substring of its current domain; events whose site no longer exists never match.
packagequerystring否User subscription by exact display ID or case-insensitive substring of the package name; events whose subscription no longer exists never match.
limitqueryinteger否—
offsetqueryinteger否—

响应

listOwnNotificationMessages 响应
状态码说明
200The caller's own event messages, newest first.

字段:schema: string items: array<OwnMessage> total: integer

400Stable error envelope. Clients map code through locale resources and do not render message directly.
401Stable error envelope. Clients map code through locale resources and do not render message directly.
403Stable error envelope. Clients map code through locale resources and do not render message directly.
405Stable error envelope. Clients map code through locale resources and do not render message directly.
500Stable error envelope. Clients map code through locale resources and do not render message directly.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/notification-subscriptions/{event_type}

Read the current user's event subscription

operationId
getNotificationSubscription
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

getNotificationSubscription 参数
名称位置类型必填说明
event_typepathstring是—

响应

getNotificationSubscription 响应
状态码说明
200Current user's subscription or an identical natural replay.

字段:event_type: string sms_enabled: boolean email_enabled: boolean sms_supported: boolean email_supported: boolean inbox_enabled?: boolean email_bound?: boolean phone_bound?: boolean revision: integer(int64) changed: boolean

400Stable error envelope. Clients map code through locale resources and do not render message directly.
401Stable error envelope. Clients map code through locale resources and do not render message directly.
403Stable error envelope. Clients map code through locale resources and do not render message directly.
404Stable error envelope. Clients map code through locale resources and do not render message directly.
405Stable error envelope. Clients map code through locale resources and do not render message directly.
500Stable error envelope. Clients map code through locale resources and do not render message directly.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PUT /v1/account/notification-subscriptions/{event_type}

Update the current user's event subscription

operationId
updateNotificationSubscription
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

参数

updateNotificationSubscription 参数
名称位置类型必填说明
event_typepathstring是—
If-Matchheaderstring是—
X-Request-IDheaderstring否Correlation identifier and retry key for this write. Reusing the same value for the same authenticated actor and operation requires the exact original path, revision, and body; an exact retry replays the original response, while changed semantics return 409.

请求体

application/json · 必填:是

updateNotificationSubscription 请求体
名称类型必填说明
sms_enabledboolean是—
email_enabledboolean是—
inbox_enabledboolean否Ticket events only (546): keep the in-app message-center copy. Omitted keeps the stored choice; any other event answers 400.

响应

updateNotificationSubscription 响应
状态码说明
200Current user's subscription or an identical natural replay.

字段:event_type: string sms_enabled: boolean email_enabled: boolean sms_supported: boolean email_supported: boolean inbox_enabled?: boolean email_bound?: boolean phone_bound?: boolean revision: integer(int64) changed: boolean

400Stable error envelope. Clients map code through locale resources and do not render message directly.
401Stable error envelope. Clients map code through locale resources and do not render message directly.
403Stable error envelope. Clients map code through locale resources and do not render message directly.
404Stable error envelope. Clients map code through locale resources and do not render message directly.
405Stable error envelope. Clients map code through locale resources and do not render message directly.
409Stable error envelope. Clients map code through locale resources and do not render message directly.
415Stable error envelope. Clients map code through locale resources and do not render message directly.
500Stable error envelope. Clients map code through locale resources and do not render message directly.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/orders

List tenant consumption records

operationId
listAccountOrders
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires billing.account.read. Callers with billing.order_records.read (tenant_owner) see all tenant users; other callers are restricted to their own user ID. Tenant rows are never editable.

参数

listAccountOrders 参数
名称位置类型必填说明
pagequeryinteger否—
limitqueryinteger否—
typequerystring: recharge / deduction / upgrade / purchase / renewal / package_change否—
statusquerystring: paid / unpaid否—
searchquerystring否Exact-page substring search over source-local display ID, UUID, user ID, username, email, or phone.
created_fromquerystring(date-time)否—
created_toquerystring(date-time)否Exclusive upper bound.

响应

listAccountOrders 响应
状态码说明
200Consumption record page

字段:items: array<AccountOrder> total: integer page: integer limit: integer can_manage: boolean

400Invalid request fields
401Authentication is required
403Required permission is absent
503Account order service unavailable

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account/password

Re-authenticate and change the current tenant user's password

operationId
changeAccountPassword
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Success revokes every existing session, including the session used for this request.

请求体

application/json · 必填:是

changeAccountPassword 请求体
名称类型必填说明
current_passwordstring(password)是—
new_passwordstring(password)是8 to 1024 printable ASCII characters (no space) with at least two of upper case, lower case, digits and symbols; otherwise password_policy_unmet.

响应

changeAccountPassword 响应
状态码说明
204Password changed and all sessions revoked. The client must sign in again.
400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/profile

Get the current tenant user's profile

operationId
getAccountProfile
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

响应

getAccountProfile 响应
状态码说明
200Current profile.

字段:id: string(uuid) username: string display_name: string email: string(email) | null(email) phone: string | null revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
500服务内部故障,请求未完成。

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PATCH /v1/account/profile

Update the current tenant user's profile

operationId
updateAccountProfile
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Changing email or phone requires current_password. A display-name-only update remains compatible without reauthentication.

参数

updateAccountProfile 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是—

请求体

application/json · 必填:是

updateAccountProfile 请求体
名称类型必填说明
expected_revisioninteger(int64)是—
display_namestring是—
emailstring(email) | null(email)是—
phonestring | null是—
current_passwordstring(password)否Required when the normalized email or phone differs from the current profile.

响应

updateAccountProfile 响应
状态码说明
200Profile updated, or an identical idempotent request replayed.

字段:id: string(uuid) username: string display_name: string email: string(email) | null(email) phone: string | null revision: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

GET /v1/account/statement

List the caller's merged consumption statement (orders, recharges and balance ledger entries)

operationId
listAccountStatement
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Requires billing.account.read in the caller's own tenant scope. Merges manual order records, package and traffic-package orders, recharge orders and balance ledger postings that have no order row (manual adjustments, migration import credits, refund/void reversals, reseller sale/wholesale) into one newest-first page. Order-like rows are restricted to the caller's own user unless the caller holds billing.order_records.read; ledger rows belong to the tenant balance and follow the same visibility as GET /v1/account/ledger. Ledger operations that already have an order row (checkout debit, provider payment, recharge payment) are not repeated.

参数

listAccountStatement 参数
名称位置类型必填说明
pagequeryinteger否—
limitqueryinteger否—
typequerystring: recharge / deduction / upgrade / purchase / renewal / package_change / traffic_package / refund / income否—
statusquerystring: paid / unpaid否—
created_fromquerystring(date-time)否—
created_toquerystring(date-time)否Exclusive upper bound.

响应

listAccountStatement 响应
状态码说明
200Statement page

字段:items: array<AccountStatementEntry> total: integer(int64) page: integer limit: integer

400Invalid request fields
401Authentication is required
403Required permission is absent
503Account order service unavailable

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表