Issue a new scoped API key (raw key returned once)
Requires project role ADMIN+. The raw key is returned exactly once in the response and can never be retrieved again. The resulting key is used as X-API-Key on the ingest/decision/ coupon/metrics/mcp APIs, gated by the scopes granted here.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
scopes
required
Array<string>
Responses
Section titled “Responses”Created (includes raw key once)
Media typeapplication/json
object
key
object
id
string
projectId
string
name
string | null
scopes
Array<string>
revoked
boolean
createdAt
string
revokedAt
string | null
keyMasked
string
key
Raw API key — shown only on creation
string
warning
string
Missing projectId
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Not authorized
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Needs project ADMIN
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Validation failed
Media typeapplication/json
object
error
required
string
issues
Array<object>
object
path
string
message
string
details
Array<object>
object
key
additional properties
any
key
additional properties
any
Example
{ "error": "参数校验失败"}