Draft Example content for planning the Kwik docs. Endpoints, fields and events are placeholders until they ship.
API referenceKwik API
A REST API over HTTPS that sends and receives JSON. Base URL: https://api.kwik.com/v1
Authentication
Send your secret key as a bearer token on every request. Keys are per store. Never put them in browser code.
curl https://api.kwik.com/v1/customers/cus_8f2a \
-H "Authorization: Bearer $KWIK_API_KEY" Customers
GET/customers/{id}
One customer, with order count, true lifetime value and segment.
{
"id": "cus_8f2a",
"email": "ava@example.com",
"orders": 6,
"true_ltv": 412.80,
"segment": "vip",
"created_at": "2026-03-02T17:14:00Z"
} POST/customers
Create a customer. Pass referred_by to credit the person who shared.
curl -X POST https://api.kwik.com/v1/customers \
-H "Authorization: Bearer $KWIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "email": "jordan@example.com", "referred_by": "AVA-7HK2" }' Rewards
POST/rewards
Grant a reward by hand: points, cashback, credit or entries. Each module page shows the reads for its reward type.
curl -X POST https://api.kwik.com/v1/rewards \
-H "Authorization: Bearer $KWIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "customer_id": "cus_8f2a", "type": "points", "amount": 100, "reason": "Product review" }' Webhooks
Add an HTTPS URL in the dashboard. Kwik sends a POST for each event, signed with the Kwik-Signature header so you can check it came from us.
{
"id": "evt_31c9",
"type": "referral.converted",
"created_at": "2026-11-20T18:02:11Z",
"data": {
"referrer_id": "cus_8f2a",
"customer_id": "cus_9d41",
"order_id": "ord_1042",
"code": "AVA-7HK2"
}
} | Event | When it fires | Module |
|---|---|---|
entry.created | A customer earned entries from an order or action. | Giveaways |
giveaway.ended | The giveaway closed and entries are final. | Giveaways |
winner.selected | A winner was drawn. | Giveaways |
upgrade.added | A customer added an upgrade to their cart. | Mini Cart |
upgrade.purchased | An order with an upgrade was paid. | Mini Cart |
cashback.pending | Cashback was earned on an order. | Cashback |
cashback.available | The return window closed and it can be spent. | Cashback |
cashback.redeemed | The customer used it or cashed out. | Cashback |
points.earned | A customer earned points. | Loyalty Points |
reward.unlocked | A customer reached a reward level. | Loyalty Points |
points.redeemed | Points were spent. | Loyalty Points |
referral.link_created | A customer created a share link. | Referrals |
referral.converted | A referred friend placed an order. | Referrals |
reward.paid | A referral reward was paid out. | Referrals |
wave.order | An order was attributed to a wave. | Waves |
wave.reward | A wave reward was earned. | Waves |
order.attributed | An order was tied to a source. | Data And Tracking |
fraud.flagged | An order or account was flagged for review. | Data And Tracking |
Errors
Errors return a status code and a JSON body with a code and a message.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | A field is missing or the wrong type. |
| 401 | unauthorized | The API key is missing or wrong. |
| 404 | not_found | That customer, reward or link does not exist. |
| 409 | conflict | The reward was already granted for this order. |
| 429 | rate_limited | Too many requests. Wait and retry. |