Skip to main content
POST
/
api
/
v1
/
partners
/
{partnerId}
/
api-keys
/
{keyId}
/
rotate
Rotate an API key
curl --request POST \
  --url https://dev-api-partner.onecluster.co/api/v1/partners/{partnerId}/api-keys/{keyId}/rotate \
  --header 'Authorization: <api-key>'
{
  "success": true,
  "responseCode": "00",
  "message": "Request processed successfully",
  "data": {
    "newKeyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "rawKey": "<string>",
    "gracePeriodEndsAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Your API key, formatted as: ApiKey ubn_sb_your_key_here

  • Sandbox keys start with ubn_sb_
  • Production keys start with ubn_pk_
  • Never use production keys during testing — they will charge real money

Headers

X-Correlation-ID
string<uuid>

Path Parameters

partnerId
string<uuid>
required
keyId
string<uuid>
required

Response

New key generated. Old key valid for 72 more hours.

Standard response wrapper for all successful API calls

success
boolean
required

Always true for successful responses

Example:

true

responseCode
string
required

00 means success

Example:

"00"

message
string
required

Human-readable description of the result

Example:

"Request processed successfully"

data
object
required

The actual response data (varies by endpoint)