コンテンツにスキップ

Create API key

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.

appId
required
string
object
name
required

A label for the API key

string
scope

Permission scope for the key

string
default: notify
Allowed values: subscribe_only notify full

API key created; key is shown only once

object
id
required
string
name
required
string
scope
required
string
Allowed values: subscribe_only notify full
last_used_at
required

Unix time in milliseconds; null until the key is first used

integer
nullable
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)