Skip to main content

Rotate Keys

Rotate API keys for a ramp. The old keys remain valid until they expire.

Endpoint

POST /ramps/{ramp_id}/rotate-keys

Path Parameters

ParameterTypeRequiredDescription
ramp_idstringYesThe ramp ID

Request

curl -X POST https://api.docyard.io/v1/ramps/ramp-xyz789/rotate-keys \
  -H "X-API-Key: dk_live_dist_aaaaaaaa" \
  -H "X-API-Secret: dk_secret_dist_bbbbbbbb"

Response

{
  "new_api_key": "dk_live_dist_cccccccc",
  "new_api_secret": "dk_secret_dist_dddddddd",
  "old_key_expires_at": "2026-03-16T10:00:00Z",
  "message": "New keys generated. Old keys expire at the specified time."
}
Important: Update your applications with the new keys before the old key expires.