Issue a new API key for the current admin
Creates a new ApiKey row scoped to the calling admin and their client via ApiKeyService::generate, then returns the plain-text key once alongside the persisted metadata. Subsequent reads only see the key_prefix. The legacy token field is kept as an alias of api_key for older admin-UI clients. Requires permission: developer_settings (also satisfied by group_all); user id=1 is unconditionally allowed.
Authorizations
Passport bearer token authentication for legacy admin sessions.
Body
Response
Key created. The api_key / token plain text is shown ONLY in this response.
42
"Zapier production"
"hys_live_"
Plain-text secret. Persist client-side immediately — it is unrecoverable.
"hys_live_abc123def456..."
Deprecated alias of api_key for legacy clients.
15
207
"success"