Account
Issue or rotate the API key
POST/v1/account/api-key
Issues the first key, or rotates the current one. Plaintext returned once.
Dashboard session · API keys refused.
Request
curl -fsS "$API/v1/account/api-key" \
-H "Authorization: Bearer $DASHBOARD_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "expected_generation": 3 }'Response
{
"api_key": "payday_live_…",
"generation": 4,
"replaced_previous_key": true
}Dashboard session only. On rotation the previous key remains valid for 24 hours. expected_generation must equal the account's current generation.
Body
expected_generationintegerrequired
Response
api_keystring- Plaintext. Once.
generationintegerreplaced_previous_keyboolean
Status codes
- 201First issuance.
- 200Rotation.
- 401
identity_unauthorizedAPI key presented. - 409
api_key_generation_conflictGeneration mismatch.