Get a running campaign
Returns one campaign, if it is running right now. A campaign that exists but is not currently running returns 404, the same as one that does not exist.
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.
Path Parameters
The campaign id.
Response
The campaign.
A discount with a budget behind it. It stops discounting once the budget is spent, which is what separates a campaign from a promotion — a promotion runs until its end date. The budget and everything measured against it are the merchant's own figures and are not exposed.
The kind of campaign, as the merchant categorised it.
"seasonal"
Whether discount_value is a percentage of the cart or a fixed amount off it.
percentage, fixed_amount The percentage, or the fixed amount, depending on discount_type.
Lifecycle status. Only a running campaign is returned, so this is always active.
"active"
Where the campaign is valid — a storefront, a till, or both.
all, online, pos Whether the campaign only applies at certain hours or on certain days.
Start of the daily window, in time_zone. Null when there is no time restriction.
End of the daily window, in time_zone. Null when there is no time restriction.
The zone the daily window is evaluated in.
"UTC"
Days of the week the campaign applies on. Null when it applies every day.
Banner artwork for the campaign. Null when the merchant has not set one.
Phone-sized banner. Null when only the desktop banner is set — fall back to image there,
rather than cropping it.

