Create a sandbox campaign
Creates a marketing campaign in your sandbox. A campaign is a budget with a discount attached: it discounts an order like a promotion, but stops once its budget is spent, so this is how budget exhaustion is exercised without spending a real one.
Use applies_to to scope where the campaign applies — online for storefront orders, pos
for in-store, or all for both. A campaign scoped to one channel does not discount the other.
Every field is optional; the defaults create an active campaign with a 1000.00 budget and a 10%
discount, starting today and running 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_*).
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
Defaults to a generated Sandbox campaign … name.
Total spend the campaign may draw down. Must be greater than zero.
percentage, fixed_amount Must be greater than zero.
Which sales channel the campaign discounts.
all, online, pos Defaults to today. Cannot be in the past.
Defaults to 30 days from today.
Response
Sandbox campaign created.
A campaign created in the sandbox — a budget with a discount attached. It discounts an order
like a promotion but stops once budget_spent reaches budget.

