Skip to main content
POST
/
admin
/
api-keys
API Key 생성
curl --request POST \
  --url https://api.headlesscommerce.io/v1/admin/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "secret"
}
'
{
  "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

Body

application/json
name
string
required

키 식별용 이름

type
enum<string>
required
Available options:
secret,
publishable

Response

201 - application/json

Created

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회 반환)