Developers
POST/v1/api-keys/{key_id}/roll

Roll API key

View as .md
curl -X POST "https://api.52-28-238-205.sslip.io/v1/api-keys/{key_id}/roll" \  -H "Cookie: <console session cookie>" \  -H "Content-Type: application/json" \  -d '{"overlap_hours":1}'

Issues a new key with the same name and scopes and keeps the old one working for overlap_hours (default 24, max 168; 0 revokes it at once). Requires developer:manage and a passkey step-up; a revoked or expired key cannot be rolled. The new secret is shown once.

Server URLhttps://api.52-28-238-205.sslip.io
POST/v1/api-keys/{key_id}/rollBase URL: https://api.52-28-238-205.sslip.io
Authorization
  • sessionCookie: <console session cookie>
  • apiKeyAuthorization: Bearer sk_test_...
Path
  • key_idstringrequired

    API key id (key_...).

Body

application/json. Fields are listed under Request body below.

Requires permissiondeveloper:manage
Held by owner, admin, developer, merchant_owner, merchant_developer, operator. The caller must hold this permission, or the call is refused with 403. From the console it also needs a passkey step-up within the last 5 minutes.

Authorization

cookieuapg_session<token>

Console session cookie (HttpOnly, SameSite=Lax)

Path Parameters

key_id*Key Id

API key id (key_...).

Request Body

application/json
  1. body
overlap_hours?Overlap Hours

Hours the previous API key keeps working after a roll (0 to 168, default 24; 0 revokes it at once).

Range0 <= value <= 168
Default24

Response Body

Success.

application/json
  1. response
api_key*
secret*Secret

Secret shown once. Store it; Abazi keeps only a hash.

previous*
[key: string]?any