API & webhooks

Run your store from code

Give buyers access from any checkout, pull every sale and customer, and make products with Eden's store API.

·3 min read

Store calls go to https://api.eden.so/store-app/v1 with a key from Settings → API that has Full access, or Custom with Store on Edit. A key with Store on Read can only make GET calls. They need Starter or above.

Give access when someone buys on another site

Selling on a checkout Eden doesn't connect to? Have it call Eden after each sale.

First, get your product's id:

curl https://api.eden.so/store-app/v1/products \
  -H "Authorization: Bearer <key>"

Then record each sale. Eden gives the buyer access and emails them their link:

curl https://api.eden.so/store-app/v1/sales \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"event":"sale","product":"<product id>","email":"[email protected]","order_id":"1001"}'

A good answer is { "ok": true, "status": "granted" }. Send "event":"refund" with the same order_id to take access away. The same order sent twice counts once. The product must be published.

Not sure which store a key reaches? GET /store-app/v1/me answers with its store.

Pull every sale, customer, or contact

Each list comes 25 rows at a time, newest first:

curl "https://api.eden.so/store-app/v1/sales?limit=100" \
  -H "Authorization: Bearer <key>"

While the answer says "has_more": true, ask again with &starting_after=<next_cursor>. Swap sales for customers, email-contacts, or products.

Make a product

curl -X POST "https://api.eden.so/store-app/v1/products" \
  -H "Authorization: Bearer <key>" -H "Content-Type: application/json" \
  -d '{"custom_ai_id":"<id>","title":"Hook Coach","price_cents":2900}'

It saves a draft. GET /store-app/v1/custom-ais lists the ids you can use. Put it live with POST /store-app/v1/products/<id>/publish.

Memberships, renewals, cancels, filters, and every product field are in the API reference.

If something's not working

What you seeWhat to do
402Store calls need Starter or above. Upgrade in Settings → Billing.
"reason": "product_not_live"Publish the product, then send the sale again.
429More than 60 sales a minute. Wait a minute and try again.
Still stuck?

Email us. A real person reads every message.

Tell us what you tried and where you got stuck. We answer within one business day.

[email protected]