Skip to main content
POST
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Body

application/json
name
string
required
key_type
enum<string>
required
Available options:
publishable,
secret
scopes
string[]

Required for secret keys. You can only grant scopes you hold yourself. Fixed once created: to change them, create a new key and revoke the old one.

Example:
channel_id
string

Binds a publishable key to one channel of the store (ch_...), so it rejects requests for other channels. Fixed once created; omit it for a store-wide key.

Response

secret key created — plaintext token returned once