Create Control Key
/enterprise/control-keysname (max 100) and keyType (MANAGEMENT or PROVISIONING) are required. scopes is an optional allowed subset (max 16); omitted/empty uses defaults that may include writes. For monitoring explicitly request tenant:billing:read. Optional allowedIps has at most 50 IP/CIDR entries. expiresAt is a future ISO-8601 timestamp, default 90 days, maximum 365 days. apiKey is shown once.
Authentication
Enterprise-owner session JWT. Management, provisioning and inference keys are not accepted.
Authorization: Bearer <USER_JWT>
Request body
namestringrequiredMax 100 / 最长 100
keyTypestringrequiredMANAGEMENT | PROVISIONING
scopesstring[]Allowed subset; max 16 / 允许权限的子集,最多 16
allowedIpsstring[]Max 50 IP/CIDR / 最多 50 个 IP/CIDR
expiresAtstringFuture ISO-8601; default 90 days, max 365 / 未来 ISO-8601,默认 90 天,最长 365 天
Fields use camelCase. Required and optional fields are described above.
1{
2 "name": "billing-monitor",
3 "keyType": "MANAGEMENT",
4 "scopes": [
5 "tenant:billing:read"
6 ]
7}Response
HTTP 201; code: 200. Values below are illustrative; fields use camelCase.
codeinteger200
dataobject | nulldata.apiKeystringdata.credentialobjectErrors
Check both HTTP status and code; on failure inspect serviceCode, msg and traceId. Invalid credentials receive no data; enterprise-owner privileges are required. Cross-tenant resources are inaccessible. Acceptance or pending approval does not mean business completion.