Skip to main content
POST
/
admin
/
api-keys
/
{id}
/
rotate
API Key 회전 (기존 키 폐기 + 새 키 발급)
curl --request POST \
  --url https://api.headlesscommerce.io/v1/admin/api-keys/{id}/rotate \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "name": "<string>",
  "type": "secret",
  "mode": "live",
  "key_hint": "<string>",
  "is_active": true,
  "last_used_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "key": "<string>"
}

Authorizations

Authorization
string
header
required

API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx

Path Parameters

id
string
required

리소스 ID

Response

200 - application/json

Success

id
string
name
string
type
enum<string>
Available options:
secret,
publishable
mode
enum<string>
Available options:
live,
test
key_hint
string

마스킹된 키 (sk_live_...abc)

is_active
boolean
last_used_at
string<date-time> | null
created_at
string<date-time>
key
string

새 원본 키 (1회 반환)