Projects

Rotate a project credential (owner-only)

Mints a replacement credential and revokes the old one in a single transaction, reusing the same name. The replacement records replacement_of. The new secret is returned exactly once.

post/projects/v1/{project_id}/credentials/{credential_id}/rotate

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/projects/v1/{project_id}/credentials/{credential_id}/rotate
  • Auth: one of:
    • API key in header SIGN-IN-WITH-X
    • HTTP bearer

Path parameters

project_idstring required
credential_idstring required

Headers

SIGN-IN-WITH-Xstring required

SIWX auth header — base64-encoded JSON payload containing a signed CAIP-122 (EIP-4361) message. See https://docs.x402.org/extensions/sign-in-with-x.

Response

Rotated. Carries the new secret ONCE.

credential_idstring
project_idstring
kind'anon' | 'service'
namestring
created_atstring date-time
last_used_atstring date-time nullable
expires_atstring date-time nullable
revoked_atstring date-time nullable
revoked_reasonstring nullable
replacement_ofstring nullable
secretstring

The credential secret, returned EXACTLY ONCE and never recoverable afterwards. Store it immediately. Responses carrying it are sent with Cache-Control: no-store and must not be persisted to any client-side result cache.

next_actionsobject[]

Changes

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