ApiKeys

Issues a new secret for the key and revokes the old one at the same moment. The key keeps its id, name and scopes. The new secret (token) is in this response only. Called by Crevio's agent, a script or an MCP client, token is null and token_secret_id names the account secret that holds it.

post/auth/keys/{id}/rotate

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Response

The key with its new secret

ApiKey required
object, string required
id, string required
name, string nullable required
last4, string required
token_type, string required
kind, 'personal' | 'team' required

personal acts as the person who made it; team sees only what the whole account sees.

scopes, string[] nullable required

What the key may call. Null for a key made before scopes existed, which reaches everything.

token, string nullable required
last_used_at, string nullable required
expires_at, string nullable required
created_at, string required

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    3 more changes in this revision