Create a sandbox promotion
Creates a promotion in your sandbox so you can apply a discount to a sandbox order.
Promotions are environment-scoped: a test key resolves only sandbox promotions and a live key only real ones. Because promotions are otherwise created by the merchant in their admin — which always writes production — this endpoint is how a promotion comes to exist in your sandbox at all.
Every field is optional; the defaults produce an active percentage promotion that starts today
and runs for 30 days. The environment is always set to sandbox by Galactic Core and is never
read from the request body.
Requires a secret test key (tybrite_sk_test_*). Publishable keys and live keys are
rejected.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_sk_test_*(sandbox) - Full read/write access to all endpoints
- ⚠️ NEVER expose in client-side code or public repositories
- Required for: write operations, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
- Format:
tybrite_pk_live_*(production) ortybrite_pk_test_*(sandbox) - Read-only access (GET requests only, plus POST semantic search)
- ✅ Safe for client-side JavaScript, mobile apps, and public code
- Allowed for: browsing products, search, CMS content, pricing queries
Endpoint-Specific Requirements:
- Authentication endpoints (
/v1/auth/*): Secret key required - Payment verification (
POST /v1/payments/verify): Secret key required - AI Recommendations (
POST /v1/recommendations): Secret key required - Semantic Search (
POST /v1/search): Both key types allowed (read-only operation) - All write operations: Secret key required
- All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Body
Display name. Defaults to a generated Sandbox promotion … name.
percentage and fixed discount the whole cart. bogo and bundle carry product
lists and are configured by the merchant.
percentage, fixed, bogo, bundle Percentage points for percentage, else a cash amount.
Cart subtotal required before the promotion applies.
Defaults to today. Cannot be in the past.
Defaults to 30 days from today.
Response
Sandbox promotion created.
A promotion created in the sandbox. Only ever resolved by a test key.

