Rotate this Code sign-in's routing-only key

POST /api/v1/code/router/keys on the Caveman Cloud control plane. Requires the code:write scope. Not exposed to autonomous agents: Mints a routing-only credential for a paid Caveman Code device sign-in. Agent and MCP sessions cannot widen their own access. Requires a live Code device session with code:write and a paid effective Cloud or Code plan, or enabled credits with a positive unreserved balance. No request body: tenant, user, session, project and scopes are server-derived. Returns the secret once. Repeating rotates the previous key; sign-out and device revocation revoke it. expires_at is the device session's expiry. Same control-plane IP, principal and organization rate limits as credits key minting. Read GET /auth/me plan and, when available, GET /code/credits plan, use_balance and balance_micros to offer Auto; this mint is authoritative.

post/code/router/keys

Request

  • Base URL
    https://api.caveman.so/api/v1
  • URL
    https://api.caveman.so/api/v1/code/router/keys
  • Auth
    • OAuth 2
      Authorization code: /api/v1/oauth/authorize
      Token URL: /api/v1/oauth/token scopes: code:write
    • or HTTP bearer
    • or API key in cookie cave_access
    • or API key in cookie __Secure-cave_identity.session_token

Response

Routing key activated. Cache-Control: no-store. Store full_key securely; it cannot be read again.

idstring uuid required
name'caveman-code-router' required
key_prefixstring required
scopesstring[] required
full_keystring required

Returned once; store securely.

created_atstring date-time required
expires_atstring date-time required

Changes

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