Skip to main content
POST
/
api
/
v1
/
partners
/
{partnerId}
/
api-keys
Generate a new API key
curl --request POST \
  --url https://dev-api-partner.onecluster.co/api/v1/partners/{partnerId}/api-keys \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "environment": "SANDBOX"
}
'
{
  "success": true,
  "responseCode": "00",
  "message": "API key created. Store the rawKey securely — it will not be shown again.",
  "data": {
    "keyId": "key-uuid-here",
    "rawKey": "ubn_sb_aBcDeFgHiJkLmNoPqRsTuVwXyZ123456",
    "prefix": "ubn_sb_aB",
    "environment": "SANDBOX",
    "createdAt": "2026-03-25T10:00:00+01:00"
  }
}

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

Body

application/json
environment
enum<string>
required

Which environment this key is for

Available options:
SANDBOX,
PRODUCTION

Response

API key created — copy the rawKey now, it will not be shown again

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)