Create API key
POST /api/v1/apps/{appId}/keys
POST
/api/v1/apps/{appId}/keys
Issues a scoped API key for the app. The raw key is returned only in this response. Session token or full-scope API key. Equivalent to the MCP tool create_api_key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” appId
required
string
Request Body required
Section titled “Request Body required ”object
name
required
A label for the API key
string
scope
Permission scope for the key
string
Responses
Section titled “ Responses ”API key created; key is shown only once
object
id
required
string
name
required
string
scope
required
string
last_used_at
required
Unix time in milliseconds; null until the key is first used
integer
created_at
required
Unix time in milliseconds
integer
key
required
Raw API key. Returned only in this creation response and cannot be retrieved again (only a hash is stored).
string
Missing name (MISSING_FIELDS) or unknown scope (INVALID_SCOPE)
Unauthorized
Insufficient API key scope
App not found (NOT_FOUND)
API key pepper not configured (CONFIG_ERROR)