Create an API key

Mints a new pk_ key and returns it ONCE (never shown again — store it). Send the session cookie from sign-in. Requires verified email ownership or provider-confirmed billing (else 403 code:email_unverified). Use the returned key as Authorization: Bearer pk_... on every /api/process and /mcp call.

post/api/keys

Request

  • Base URL: https://api.peelaway.io
  • URL: https://api.peelaway.io/api/keys
  • Auth: one of:
    • API key in cookie better-auth.session_token
    • HTTP bearer

Request body

namestring required

A human label for the key (e.g. 'agent-prod').

Response

Key created (secret returned once)

keystring required

The full secret key (pk_...). Returned ONCE — store it now. Send as Authorization: Bearer <key>.

idstring required
prefixstring required

Display prefix (first 15 chars + '...').

namestring required

Changes

No recorded changes to this operation across all 1 revision of this API.