API Keys
Admin

Register a service signing key (ES256 public JWK)

Changed on

Requires a human bearer JWT whose user id is present in the immutable server-owned SUPER_ADMIN_USER_IDS allowlist. Binds a P-256 public key to the configured service principal, or with principal agent to the bookkeeping agent principal while the agent is enabled. name must carry a registered writer for that principal (cloud-bookkeeping, hermes-daily-bookkeeping, manual-cli for bookkeeping; penny-agent for agent; optional :<tag> suffix excluding reserved machine prefixes) so exchanged service keys preserve writer attribution (GB-116). A JWK containing a private member (d) is refused. The kid is the RFC 7638 thumbprint, computed by the server. Lifetime defaults to 180 days, at most 365.

post/admin/service-client-keys

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Request body

RegisterServiceClientKeyInput required
name, string required
publicKeyJwk, object required

P-256 public JWK (kty EC, crv P-256, x, y). Must not contain d.

expiresInDays, integer
principal, 'bookkeeping' | 'agent'

#4212: agent binds the key to the bookkeeping agent principal; its exchanged keys get the agent route rules. 503 unless the agent is enabled for this deployment (PENNY_ENABLED).

Response

Signing key registered

ServiceClientKeyResponse required
success, true required
data, ServiceClientKey required

Changes