DocsAPI reference

Draft Example content for planning the Kwik docs. Endpoints, fields and events are placeholders until they ship.

API reference

Kwik 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.

GET/customers/{id}
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.

Response · 200
{
  "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.

POST/customers
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.

POST/rewards
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.

Example event
{
  "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"
  }
}
EventWhen it firesModule
entry.createdA customer earned entries from an order or action.Giveaways
giveaway.endedThe giveaway closed and entries are final.Giveaways
winner.selectedA winner was drawn.Giveaways
upgrade.addedA customer added an upgrade to their cart.Mini Cart
upgrade.purchasedAn order with an upgrade was paid.Mini Cart
cashback.pendingCashback was earned on an order.Cashback
cashback.availableThe return window closed and it can be spent.Cashback
cashback.redeemedThe customer used it or cashed out.Cashback
points.earnedA customer earned points.Loyalty Points
reward.unlockedA customer reached a reward level.Loyalty Points
points.redeemedPoints were spent.Loyalty Points
referral.link_createdA customer created a share link.Referrals
referral.convertedA referred friend placed an order.Referrals
reward.paidA referral reward was paid out.Referrals
wave.orderAn order was attributed to a wave.Waves
wave.rewardA wave reward was earned.Waves
order.attributedAn order was tied to a source.Data And Tracking
fraud.flaggedAn 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.

StatusCodeMeaning
400bad_requestA field is missing or the wrong type.
401unauthorizedThe API key is missing or wrong.
404not_foundThat customer, reward or link does not exist.
409conflictThe reward was already granted for this order.
429rate_limitedToo many requests. Wait and retry.