# Store API reference

> Every store API endpoint, with sign-in by API key or OAuth, for your own code and for Zapier.

Every endpoint of Eden's store API. Your own code can call them with an API key from **Settings →
API**, and the **Eden (Creator Platform)** app on Zapier calls the same ones. You don't need this
page to use the Zapier app.

Version 1.0 of the app has the sign-in, the products list, and **Record a sale**. Everything else on
this page belongs to version 1.1.

The whole store API is also in one OpenAPI file you can load into Postman or a code generator: `https://api.eden.so/store-app/v1/openapi.json`.

## Sign in with an API key

For your own code, a checkout, or a script.

1. In Eden, go to **Settings → API** and click **Generate key** with **Full access** picked, or **Custom** with **Store** on **Read** or **Edit**.
2. Send it on every call as `Authorization: Bearer <key>`.

A key works on one store. If you run more than one, pick it when you make the key; otherwise it uses your main store. You need edit access to that store. A key with **Store** on **Read** (or a **Read-only** key) can make `GET` calls only. A key with **Store** off can't use the store API. Store calls need Starter or above. See [Keys](https://eden.so/developers/keys/) for making one and [Run your store from code](https://eden.so/developers/store/) for a first call.

## Sign in with OAuth

For apps other people connect, like the Zapier app. Eden uses OAuth 2.0 with PKCE.

- **Scope:** 1.0 asks for `store`, which can only call `/store-app/v1/*`. 1.1 asks for `read write`, the same access as Eden's MCP connectors, for the workspace steps.
- **Authorize:** `GET https://oauth.eden.so/oauth/authorize` with `response_type=code`, `client_id`, `redirect_uri`, `state`, `scope`, `code_challenge`, and `code_challenge_method=S256`.
- **Token:** `POST https://oauth.eden.so/oauth/token`, form encoded. Send `grant_type=authorization_code` with `code`, `redirect_uri`, `client_id`, `client_secret`, and `code_verifier`.
- **Refresh:** the same token URL with `grant_type=refresh_token` and `refresh_token`.

Send the token on every call as `Authorization: Bearer <access_token>`.

## Who is signed in

`GET https://api.eden.so/me` (the connection test, any Eden account) returns the user and their workspaces. `GET https://api.eden.so/store-app/v1/me` returns the store owner:

```json
{
  "ok": true,
  "id": "user_123",
  "email": "seller@example.com",
  "handle": "yourname",
  "store": { "handle": "yourname", "name": "Your Store", "workspace_id": "ws_123" }
}
```

`store` is the store this sign-in reaches.

## The seller's products

`GET https://api.eden.so/store-app/v1/products`

Newest first, own-checkout products on top. Archived products are left out.

```json
{
  "ok": true,
  "products": [
    {
      "id": "prod_123",
      "name": "My Course (monthly)",
      "title": "My Course",
      "billing": "monthly",
      "live": true,
      "ownCheckout": true
    }
  ]
}
```

## Full lists: sales, customers, email contacts, products

For syncing your store into a sheet, a CRM, or your own app. The Zapier app doesn't use these. Each list is newest first and comes in pages.

| Route                              | Filters                                                                 | What each row is                                                                  |
| ---------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `GET /store-app/v1/sales`          | `product`, `email`, `status` (`paid`, `refunded`, or `free`)            | One sale line, from Eden checkout or your own checkout                            |
| `GET /store-app/v1/customers`      | `product`, `has_access` (`true` or `false`), `tag` (a tag name or id)   | One person, with every product they have in `products`                            |
| `GET /store-app/v1/email-contacts` | `status` (`subscribed`, `unsubscribed`, `bounced`, `complained`), `tag` | One person on your email list                                                     |
| `GET /store-app/v1/products`       | `status` (`draft`, `live`, or `off`)                                    | One product, drafts included. Send any paging field or `status` to get this list. |

Every list also takes:

- `limit`: 1 to 100 rows a page. Defaults to 25.
- `starting_after`: the `next_cursor` from the page before, for the next page.
- `created_after` and `created_before`: an ISO date or milliseconds.

```json
{
  "ok": true,
  "data": [{ "id": "purchase:abc123", "status": "paid", "buyer_email": "buyer@example.com" }],
  "has_more": true,
  "next_cursor": "WzE3NTk2MDAwMDAwMDAsInB1cmNoYXNlOmFiYzEyMyJd"
}
```

Keep asking while `has_more` is `true`. A page filtered by `tag` can come back short, or even empty, with `has_more` still `true`.

Sales rows look like the New Sale feed below, plus `status`. Refunds from your own checkout don't change its sale; they show up in **New Refund**.

To get one row:

- `GET /store-app/v1/sales/<sale id>`, using an `id` from the list.
- `GET /store-app/v1/customers/<email>`.
- `GET /store-app/v1/email-contacts/<email>`.

## Make and edit products

Make a draft, change it, and put it live, with the same rules as the store editor. Build what's inside (the Custom AI, lessons, files) in Eden first. Covers and files can't be uploaded through the API.

| Route                                        | What it does                                                                             |
| -------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `GET /store-app/v1/custom-ais`               | The Custom AIs and courses this store can sell, with `product_id` once one has a product |
| `POST /store-app/v1/products`                | Make a draft: `custom_ai_id` plus any fields below. Answers `201`.                       |
| `GET /store-app/v1/products/<id>`            | One product, every field                                                                 |
| `PATCH /store-app/v1/products/<id>`          | Change fields. Leave one out to keep it, send `null` to clear it.                        |
| `POST /store-app/v1/products/<id>/publish`   | Put it live. People who already bought it get the new version.                           |
| `POST /store-app/v1/products/<id>/unpublish` | Stop sales. Buyers keep what they have.                                                  |

| Field                                                                     | What it is                                                                                                                                                    |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`, `slug`                                                           | The name and the end of its web address                                                                                                                       |
| `tagline`, `headline`, `subheadline`                                      | The short line under the name, and the big lines at the top of the page                                                                                       |
| `price_cents`                                                             | The price in cents of your store's currency. `0` is free.                                                                                                     |
| `billing`                                                                 | `one-time`, `monthly`, or `yearly`                                                                                                                            |
| `yearly_price_cents`                                                      | With `monthly`, a yearly price buyers can pick instead                                                                                                        |
| `compare_at_cents`                                                        | A crossed-out "was" price                                                                                                                                     |
| `trial_days`                                                              | Free days before a membership's first charge                                                                                                                  |
| `first_payment_cents`                                                     | A lower first payment for a membership (its first month or year)                                                                                              |
| `payment_plan`                                                            | `{ "count": 3, "amount_cents": 1700 }`: pay a one-time price in monthly parts                                                                                 |
| `quantity_limit`, `quantity_show_left`, `quantity_waitlist`               | Sell a set number, show how many are left, and take a waitlist once sold out                                                                                  |
| `waitlist_mode`, `waitlist_opens_at`                                      | Take waitlist emails instead of selling, with an optional `YYYY-MM-DD` open day                                                                               |
| `included_credits`                                                        | AI credits in the price: `0`, `100`, `250`, `500`, or `1000`                                                                                                  |
| `order_bump`                                                              | A checkbox in the buy box that adds another product to the same payment: `{ "product_id": "...", "price_cents": 900, "headline": "..." }`. `null` removes it. |
| `upsell`, `upsell_steps`                                                  | The one-click offer after payment, and a funnel's offers 2 and 3. Same shape, with `description_markdown`, `accept_label`, `decline_label`.                   |
| `free_email_link`                                                         | `true` sends a free download as an emailed link, with no account                                                                                              |
| `free_price_label`, `free_price_hidden`                                   | Your own words instead of "Free", or no price at all, on a free product                                                                                       |
| `require_terms_consent`, `terms_consent`                                  | A required "I agree to the Terms" tick at paid checkout. `terms_consent` is `{ "terms_url": "https://...", "privacy_url": null, "text": null }`.              |
| `require_access_consent`                                                  | A required tick where the buyer gives up the 14-day right to cancel (UK and EU)                                                                               |
| `chat_enabled`                                                            | `false` turns the AI off, making it a course or a download                                                                                                    |
| `checkout_mode`, `checkout_url`                                           | `eden`, or `external` with your own checkout link                                                                                                             |
| `body_markdown`, `faq_markdown`, `creator_bio`, `refund_policy`           | Page copy                                                                                                                                                     |
| `welcome_markdown`                                                        | The **Start here** page buyers see after they buy                                                                                                             |
| `hero_image_url`, `video_url`, `theme`, `accent`, `cta_label`, `sign_off` | The look and the buy button                                                                                                                                   |
| `whats_included`                                                          | Up to 12 lines for the offer card. `null` brings back Eden's own.                                                                                             |
| `sections`                                                                | Show or hide parts of the page, like `{ "faq": false }`, and their `order`                                                                                    |

Every answer has `product`, `can_publish`, and `publish_checklist`, which lists what's left before it can go live.

Publishing has the same checks as the editor: a paid product needs Stripe connected or your own checkout link, and every product needs your support email. A product with `waitlist_mode` on can go live without Stripe. Setting it to `false` opens sales, and a paid product needs Stripe then. Answers also carry `waitlist_waiting`, how many people are on the waitlist. Products need an API key; the Zapier connection can't change them.

## Record a sale, renewal, cancel, end, or refund

`POST https://api.eden.so/store-app/v1/sales` with a JSON body.

| Field             | Required | What it is                                                         |
| ----------------- | -------- | ------------------------------------------------------------------ |
| `event`           | Yes      | `sale`, `renewal`, `cancel`, `end`, or `refund`                    |
| `product`         | Yes      | A product `id` from the products list                              |
| `email`           | Yes      | The email the buyer paid with                                      |
| `name`            | No       | The buyer's name                                                   |
| `order_id`        | No       | The checkout's order or payment ID. The same ID twice counts once. |
| `subscription_id` | No       | The checkout's subscription ID, for memberships                    |
| `paid_until`      | No       | When the paid time ends (ISO date or milliseconds)                 |
| `ends_at`         | No       | When a cancelled membership's access ends                          |

What each event does:

- **sale** and **renewal** give the buyer access, or extend it on a membership, and send the access email on a first sale.
- **cancel** keeps access until the paid time runs out. Memberships only.
- **end** stops access now. Memberships only.
- **refund** takes access away for that order.

A good answer:

```json
{ "ok": true, "status": "granted" }
```

`status` is one of `granted`, `restored`, `renewed`, `cancelled`, `revoked`, or `duplicate`.

When Eden turns a sale away, it says why:

```json
{
  "ok": false,
  "status": "rejected",
  "reason": "product_not_found",
  "message": "That product isn't in this Eden store. Pick it again in the Eden step of your Zap."
}
```

## New sales (the New Sale trigger)

`GET https://api.eden.so/store-app/v1/sales/recent`, optionally `?product=<product id>`

Up to 50 paid sales from the last 30 days, newest first, from Eden checkout and the seller's own checkout. Free claims, refunds, and test sales are left out. Zapier keeps the `id`s it hasn't seen.

`utm_*`, `fbclid`, and `referrer` come from the link an Eden checkout buyer used. They are `null` when the link had none, and always `null` for own-checkout sales.

`amount_cents` is the price before tax. `tax_cents` is the tax your store collected on top (`0` when none), `tax_behavior` says whether it was added at checkout (`exclusive`) or was already in the price (`inclusive`), and `total_cents` is what the buyer paid. `list_price_cents` and `discount_cents` are set when a discount code or sale changed the price. `terms_consent_at` and `access_consent_at` are when the buyer ticked your Terms box and the right-to-cancel box, or `null` when the product doesn't ask. All seven are `null` for own-checkout sales, because Eden never saw that charge.

```json
{
  "ok": true,
  "sales": [
    {
      "id": "purchase:abc123",
      "product_id": "prod_123",
      "product_title": "My Course",
      "buyer_email": "buyer@example.com",
      "buyer_name": "Sam Buyer",
      "amount": 49,
      "amount_cents": 4900,
      "currency": "usd",
      "billing": "one-time",
      "source": "eden_checkout",
      "order_id": "order_123",
      "discount_code": null,
      "tax_cents": 0,
      "tax_behavior": null,
      "total_cents": 4900,
      "list_price_cents": null,
      "discount_cents": null,
      "terms_consent_at": null,
      "access_consent_at": null,
      "utm_source": "facebook",
      "utm_medium": "paid_social",
      "utm_campaign": "spring-launch",
      "utm_content": null,
      "utm_term": null,
      "fbclid": "IwAR0abc123",
      "referrer": "facebook.com",
      "created_at": "2026-09-27T17:00:00.000Z"
    }
  ]
}
```

## Add a customer (the Add Customer action)

`POST https://api.eden.so/store-app/v1/customers` with a JSON body. Gives someone free access to a live product without counting a sale.

| Field        | Required | What it is                                                      |
| ------------ | -------- | --------------------------------------------------------------- |
| `product`    | Yes      | A product `id` from the products list                           |
| `email`      | Yes      | The customer's email                                            |
| `name`       | No       | The customer's name                                             |
| `send_email` | No       | `false` adds them without the access email. Defaults to `true`. |

Answers `"status": "added"` or `"already_has_access"`. It never turns back on access the seller switched off (`"reason": "access_off"`).

## More triggers

Each works like New Sale: up to 50 events from the last 30 days, newest first. Most take `?product=<product id>`.

| Trigger                       | Route                                            | List key       |
| ----------------------------- | ------------------------------------------------ | -------------- |
| New Customer                  | `GET /store-app/v1/customers/recent`             | `customers`    |
| New Membership Payment        | `GET /store-app/v1/memberships/payments`         | `payments`     |
| Membership Cancelled or Ended | `GET /store-app/v1/memberships/changes`          | `changes`      |
| New Refund                    | `GET /store-app/v1/refunds/recent`               | `refunds`      |
| New Email Signup              | `GET /store-app/v1/email-signups/recent`         | `signups`      |
| New Review                    | `GET /store-app/v1/reviews/recent`               | `reviews`      |
| New Cohort Signup             | `GET /store-app/v1/cohort-signups/recent`        | `signups`      |
| Form Completed                | `GET /store-app/v1/quiz-responses/recent`        | `responses`    |
| New Booking                   | `GET /store-app/v1/calls/booked`                 | `calls`        |
| Booking Cancelled             | `GET /store-app/v1/calls/canceled`               | `calls`        |
| Booking Rescheduled           | `GET /store-app/v1/calls/moved`                  | `calls`        |
| New Coaching Application      | `GET /store-app/v1/coaching-applications/recent` | `applications` |
| New Affiliate                 | `GET /store-app/v1/affiliates/recent`            | `affiliates`   |
| New Affiliate Application     | `GET /store-app/v1/affiliates/applications`      | `applications` |
| New Affiliate Sale            | `GET /store-app/v1/affiliates/sales`             | `sales`        |
| New Testimonial               | `GET /store-app/v1/testimonials/recent`          | `testimonials` |
| Lesson Completed              | `GET /store-app/v1/lessons/completed`            | `completions`  |
| New Lesson Question           | `GET /store-app/v1/lesson-questions/recent`      | `questions`    |
| New Paid Question             | `GET /store-app/v1/paid-questions/recent`        | `questions`    |
| Form Not Finished             | `GET /store-app/v1/quiz-responses/unfinished`    | `starts`       |
| New Community Member          | `GET /store-app/v1/community-members/recent`     | `members`      |
| New Community Post            | `GET /store-app/v1/community-posts/recent`       | `posts`        |

- **New Customer** covers sales, free claims, own-checkout sales, imports, and people added by hand. `how` is `bought`, `free`, `own_checkout`, or `added`.
- **New Membership Payment** covers the first payment and every renewal. `payment` is `first` or `renewal`.
- **Membership Cancelled or Ended** has `change` set to `cancelled` (access runs until `access_ends_at`) or `ended` (access is over). A cancel and the later end are two events.
- **New Email Signup** fires once per email address. It has no product filter. `kind` is `waitlist` when the person joined a product's waitlist (then `product_id` and `product_title` name the product), or `signup` for every other form.
- **New Review** leaves out imported testimonials. `reviewer_email` is empty when Eden can't match the review to a customer.
- **Form Completed** takes `?quiz=<form id>` instead of a product. `marketing_consent` says whether the person ticked the email box. `files` lists what they uploaded on file questions, each with a `name` and a download `url` that works for one hour. Read the list again for a fresh link.
- **Bookings** take `?call_type=<call type id>` instead of a product; `GET /store-app/v1/call-types` lists them. A booking waiting on payment isn't listed until it's paid. Each move is its own Booking Rescheduled event, with `previous_starts_at`.
- **New Affiliate Sale** has one event per sale or renewal, with the affiliate's `commission`. Refunded sales drop out.
- **New Testimonial** covers testimonials sent through your testimonial link, not imported ones.
- **Lesson Completed** has `finished_course` set to true on the lesson that finishes the course.
- **New Paid Question** covers questions buyers send through an Ask me product. `answer_due_at` is when your promised reply time runs out, and `answer_url` opens your Paid questions inbox.
- **Form Not Finished** lists people who typed their email on a form and left before the end. It fires one hour after they started, once per person per form, and never for someone who finished later. It takes `?quiz=<form id>`.
- **New Community Member** and **New Community Post** cover the communities you own. Both take `?community=<community id>`. Posts are Library posts, not chat messages. `author_role` tells your own and your hosts' posts apart from members' posts.

## Accept or decline applications

For an application form set to review each one. Form ids come from `GET /store-app/v1/quizzes`.

| Route                                                     | What it does                                                                            |
| --------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `GET /store-app/v1/forms/<form id>/applications`          | The people who applied. `status`: `pending` (default), `accepted`, `declined`, or `all` |
| `POST /store-app/v1/forms/<form id>/applications/accept`  | Accept one person                                                                       |
| `POST /store-app/v1/forms/<form id>/applications/decline` | Decline one person                                                                      |

Name the person with `response_id` (an `id` from the list, or the Form Completed trigger's `id`) or `email` (their newest application on that form). The form's accept or decline email goes out and its tags are added, unless you send `"send_email": false`. The answer has `changed` (`false` when they were already decided that way) and `email` (`queued`, `off`, `not_set_up`, `no_email`, or `skipped`).

## Instant triggers

New Sale, New Customer, New Membership Payment, Membership Cancelled, New Refund, New Email Signup, New Waitlist Signup, Form Completed, Form Not Finished, the three booking triggers, New Coaching Application, New Affiliate Sale, New Paid Question, New Community Member, and New Community Post can push instead of poll.

- Subscribe: `POST /store-app/v1/hooks` with `{ "event": "new_sale", "target_url": "<your Zapier hook>" }`. Answers `{ "ok": true, "id": "<hook id>" }`. Events already in the feed never fire.
- Unsubscribe: `DELETE /store-app/v1/hooks/<hook id>`.
- About every 15 seconds, Eden POSTs `{ "event": "new_sale", "ids": [...] }` to the hook. Fetch those ids from the trigger's route above.
- `target_url` must be a `zapier.com` address. A `410` answer deletes the hook.

## Webhooks

Eden posts store events to your own addresses, signed and retried. Setup, the event list, and how to check signatures are in [Get events with webhooks](https://eden.so/developers/webhooks/).

| Route                                          | What it does                                                                                     |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `GET /store-app/v1/webhook-events`             | Every event type, grouped                                                                        |
| `GET /store-app/v1/webhooks`                   | Your webhooks                                                                                    |
| `POST /store-app/v1/webhooks`                  | Add one: `url`, `events` (types, or `["*"]`), optional `description`. Answers the `secret` once. |
| `PATCH /store-app/v1/webhooks/<id>`            | Change `url`, `events`, `description`, or `enabled`                                              |
| `DELETE /store-app/v1/webhooks/<id>`           | Delete it                                                                                        |
| `POST /store-app/v1/webhooks/<id>/roll-secret` | A new secret. The old one stops working.                                                         |
| `POST /store-app/v1/webhooks/<id>/test`        | Sends a sample now, optional `type`. Answers `delivered`, `response_code`, `response`.           |
| `GET /store-app/v1/webhooks/<id>/deliveries`   | Each try's result, newest first, paged                                                           |
| `POST /store-app/v1/deliveries/<id>/resend`    | Sends that event again                                                                           |
| `GET /store-app/v1/events`                     | Every event from the last 30 days, paged, `type` to filter                                       |
| `GET /store-app/v1/events/<event id>`          | One event                                                                                        |

The Zapier app's instant triggers (`/store-app/v1/hooks` below) are separate and unchanged.

## Email contacts

Each takes `email`, plus `tags`: a list of tag names or ids.

| Route                                           | Extra fields            | What it does                                                                                  |
| ----------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------- |
| `POST /store-app/v1/email-contacts`             | `name`, `double_opt_in` | Adds the person to your email list if new, then adds the tags.                                |
| `POST /store-app/v1/email-contacts/remove-tags` | None                    | Removes the tags. Never adds the person. `result` is `removed`, `not_tagged`, or `not_found`. |

`POST /email-contacts` makes any tag name that doesn't exist yet. `GET /store-app/v1/email-tags` lists your tags. `GET /store-app/v1/email-contacts/tagged` is the **Contact Tagged** feed, with `?tag=<tag id>` to filter.

Change or remove one person by email:

- `PATCH /store-app/v1/email-contacts/<email>` takes any of `name`, `subscribed: false` (unsubscribes them), `add_tags`, and `remove_tags`. Eden never turns emails back on for someone who unsubscribed, bounced, or marked spam, so `subscribed: true` answers `409` for them.
- `DELETE /store-app/v1/email-contacts/<email>` takes them off your list. Someone who unsubscribed or marked spam is kept (`"kept": true`), so a later purchase can't email them again.

Send `"double_opt_in": true` to send a new person a confirm email first. They show as `pending` and get no other email until they click it. Someone already on your list is not asked again.

Each contact has `email`, `name`, `phone`, `status`, `tags`, your custom `fields`, and `last_engaged_at` (the last time they opened or clicked).

To start a sequence for someone, add the tag the sequence starts on. `GET /store-app/v1/email-sequences` lists your sequences, with `starts_when` showing each one's tags or products.

## Email automations and broadcasts

| Route                                                | What it does                                                                    |
| ---------------------------------------------------- | ------------------------------------------------------------------------------- |
| `GET /store-app/v1/email-automations`                | Your automations, with `status` (`draft`, `live`, or `paused`)                  |
| `POST /store-app/v1/email-automations/<id>/contacts` | Puts people into a live automation. Send `email`, or `emails` (up to 200).      |
| `GET /store-app/v1/email-broadcasts`                 | Your broadcasts, newest first                                                   |
| `GET /store-app/v1/email-broadcasts/<id>`            | One broadcast, with its words and its `stats`                                   |
| `GET /store-app/v1/email-broadcasts/<id>/recipients` | Who it went to. `?filter=opened`, `clicked`, or `bounced`. Paged with `cursor`. |
| `POST /store-app/v1/email-broadcasts`                | Writes a broadcast. Saves a draft unless you ask it to send.                    |

Adding people to an automation answers `added`, `skipped` (already in it, unsubscribed, or bounced), and `not_found` (emails that aren't on your list yet). Add them with `POST /store-app/v1/email-contacts` first.

To write a broadcast, send:

| Field     | Required | What it is                                                               |
| --------- | -------- | ------------------------------------------------------------------------ |
| `subject` | Yes      | The subject line                                                         |
| `body`    | Yes      | The email's words, as plain text or Markdown                             |
| `preview` | No       | The inbox preview line                                                   |
| `name`    | No       | Your own label. Never sent.                                              |
| `tag_ids` | No       | Only contacts with one of these tags. Leave out for everyone subscribed. |
| `send`    | No       | `true` sends it now. Leave out to save a draft only.                     |
| `send_at` | No       | An ISO time with an offset. Schedules it instead.                        |

A sent broadcast follows the same rules as one sent in the app: your plan's limits, and nobody who unsubscribed or bounced. `stats` has `sent`, `delivered`, `opened`, `clicked`, `bounced`, `complained`, `waiting`, `sales`, and `revenue_usd_cents`.

## Community members and events

Community ids come from `GET /store-app/v1/communities`.

| Route                                                    | What it does                                                                |
| -------------------------------------------------------- | --------------------------------------------------------------------------- |
| `GET /store-app/v1/communities/<id>/members`             | The members. `q` searches names, plus `filter`, `limit`, and `offset`.      |
| `POST /store-app/v1/communities/<id>/members`            | Invites a host: `email` and `role` (`admin`, `moderator`, or `contributor`) |
| `PATCH /store-app/v1/communities/<id>/members/<member>`  | Changes a member's `role`, or sends `add_tags` and `remove_tags`            |
| `DELETE /store-app/v1/communities/<id>/members/<member>` | Removes the member                                                          |
| `GET /store-app/v1/communities/<id>/events`              | The events. `?when=upcoming` or `past`.                                     |
| `PATCH /store-app/v1/communities/<id>/events/<run id>`   | Changes `starts_at`, `time_zone`, `duration_min`, or `recording_url`        |
| `DELETE /store-app/v1/communities/<id>/events/<run id>`  | Cancels that event                                                          |

- `<member>` is the member's `user_id` from the list. In a community you own, it can be their email instead.
- Member emails only show for communities you own.
- To add a plain member, give them the community's product with `POST /store-app/v1/customers`. To take a member out for good, also call `POST /store-app/v1/customers/remove-access`, or their purchase lets them back in.

## Booked calls

| Route                                           | What it does                                                       |
| ----------------------------------------------- | ------------------------------------------------------------------ |
| `GET /store-app/v1/calls`                       | Your upcoming calls, with `call_id`, `starts_at`, and `join_url`   |
| `POST /store-app/v1/calls/<call id>/cancel`     | Cancels the call and emails the booker                             |
| `POST /store-app/v1/calls/<call id>/reschedule` | Moves it. Send `starts_at`, and `time_zone` or `duration_minutes`. |

A cancel never refunds a paid call. Refund it with the sale's own refund. A new time that clashes with another call answers `409`.

## Receipts

| Route                                             | What it does                                                      |
| ------------------------------------------------- | ----------------------------------------------------------------- |
| `GET /store-app/v1/sales/<sale id>/receipt`       | The receipt's fields: `number`, `paid_at`, `lines`, `total_cents` |
| `POST /store-app/v1/sales/<sale id>/receipt/send` | Emails the buyer their receipt. One per sale per minute.          |

`<sale id>` is a sale's `id` from New Sale or `GET /store-app/v1/sales`. Sales made on your own checkout have no Eden receipt and answer `409`.

## Find a customer

`GET https://api.eden.so/store-app/v1/customers/find?email=<email>`, optionally `&product=<product id>`

An empty `customers` list means no match. A match has `has_access`, `products_with_access`, and an `access` list with one line per product.

## Customer actions

Each takes a JSON body with `product` (a product `id`) and `email`, plus the fields listed.

| Route                                        | Extra fields                                   | What it does                                                    |
| -------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------- |
| `POST /store-app/v1/customers/remove-access` | None                                           | Switches off access. An Eden checkout membership stops billing. |
| `POST /store-app/v1/customers/access-email`  | None                                           | Sends the access email again. One per person per minute.        |
| `POST /store-app/v1/customers/cohort`        | `cohort` (a cohort `id`), `over_cap` (boolean) | Moves an Eden checkout buyer into that cohort.                  |

`GET /store-app/v1/products/<product id>/cohorts` lists a product's cohorts or workshop dates. Each has `starts_at`, `ends_at`, `seat_cap`, `enrolled`, and its `sessions` with `join_url`, `recording_url` (once the replay is up), and `file_names`.

## Create a discount code

`POST https://api.eden.so/store-app/v1/discount-codes` with a JSON body.

| Field        | Required | What it is                                                     |
| ------------ | -------- | -------------------------------------------------------------- |
| `product`    | Yes      | A product `id`. It must have a price and use Eden checkout.    |
| `kind`       | Yes      | `percent` or `amount`                                          |
| `value`      | Yes      | Percent off (1 to 100), or dollars off                         |
| `code`       | No       | 3 to 24 letters, numbers, or dashes. Empty makes a random one. |
| `max_uses`   | No       | How many times it can be used                                  |
| `expires_at` | No       | When it stops working (ISO date or milliseconds)               |

The answer includes the `code` and a `checkout_url` with the code already filled in.

## Coupons

Coupons are your always-on discount codes, the same ones on the **Coupons** page. A coupon is one row per product, so a code on three products is three coupons with the same `code`.

| Call                                       | What it does                                                               |
| ------------------------------------------ | -------------------------------------------------------------------------- |
| `GET /store-app/v1/coupons`                | Lists every coupon. Filter with `?product=<product id>` or `?code=<code>`. |
| `POST /store-app/v1/coupons`               | Makes one code on one or more products                                     |
| `GET /store-app/v1/coupons/<coupon id>`    | Gets one coupon                                                            |
| `PATCH /store-app/v1/coupons/<coupon id>`  | Turns it off or on, or changes its limit or end date                       |
| `DELETE /store-app/v1/coupons/<coupon id>` | Deletes it. Sales already made with it keep their `discount_code`.         |

To make one, send:

| Field                               | Required    | What it is                                                           |
| ----------------------------------- | ----------- | -------------------------------------------------------------------- |
| `products`                          | Yes         | A list of product ids. Each must have a price and use Eden checkout. |
| `percent_off` or `amount_off_cents` | One of them | Percent off (1 to 100), or cents off in your store's currency        |
| `code`                              | No          | 3 to 24 letters, numbers, or dashes. Leave it out for a random one.  |
| `max_uses`                          | No          | How many times it can be used on each product                        |
| `expires_at`                        | No          | When it stops working (ISO date or milliseconds)                     |

If one product fails a check, nothing is made and the answer names it in `product_id`.

To change one, send `active` (`false` turns it off and keeps its `used_count`), `max_uses`, or `expires_at`. Send `null` for no limit or no end date.

Each coupon has `id`, `code`, `product_id`, `kind`, `percent_off`, `amount_off_cents`, `max_uses`, `used_count`, `expires_at`, `active`, and `created_at`.

## Workspace steps

Same endpoints as Eden's MCP connectors. Each takes a workspace, and defaults to your main one.

| Step               | Endpoint                                                                                       |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| Workspace dropdown | `GET https://api.eden.so/me`                                                                   |
| Board dropdown     | `GET https://api.eden.so/workspaces/<id>/mobile/items?type=canvas`                             |
| Custom AI dropdown | `GET https://api.eden.so/custom-ai?workspaceId=<id>`                                           |
| Schedule dropdown  | `GET https://scheduling.eden.so/mcp/schedules?workspaceId=<id>`                                |
| Save Link          | `POST https://api.eden.so/workspace-items/link`, then `POST /items/<id>/reference` for a board |
| Create Note        | `POST https://api.eden.so/workspace-items/markdown`                                            |
| Schedule a Post    | `POST https://scheduling.eden.so/mcp/schedule-post` or `/mcp/drafts`                           |
| Post media upload  | `POST https://api.eden.so/scheduling/media/prepare`, then a PUT to the upload URL              |
| Ask a Custom AI    | `POST https://ai.eden.so/zapier/ask`                                                           |
| New Item Saved     | `GET https://api.eden.so/workspaces/<id>/mobile/library`                                       |
| Post Published     | `GET https://scheduling.eden.so/mcp/posts?status=posted` (and `partial`)                       |
| Post Failed        | `GET https://scheduling.eden.so/mcp/posts?status=failed` (and `partial`)                       |
| Routine Finished   | `GET https://ai.eden.so/zapier/routine-runs?workspace_id=<id>`                                 |
| Table dropdown     | `GET https://api.eden.so/workspaces/<id>/items/search?type=table`                              |
| Add Table Row      | `POST https://api.eden.so/mobile/table/<table id>/rows/batch`                                  |
| Update Table Row   | `PATCH https://api.eden.so/mobile/table/<table id>/rows`                                       |
| Create Board       | `POST https://api.eden.so/workspaces/<id>/boards`, or `/spaces/<board id>/boards` for inside   |
| Find Item          | `GET https://api.eden.so/workspaces/<id>/items/search?q=<words>`                               |
| New Draft          | `GET https://scheduling.eden.so/mcp/posts?status=draft`                                        |
| Post Scheduled     | `GET https://scheduling.eden.so/mcp/posts?status=scheduled`                                    |

**Ask a Custom AI** answers at once with `chat_id` and `chat_url`, runs the chat in the background on normal AI credits, then posts `{ "ok": true, "answer": "..." }` to Zapier's `callback_url`. Eden only posts to Zapier hook addresses. Leave out `custom_ai_id` to ask Eve.

**Routine Finished** returns each routine's latest run from the last day, with the answer.

## Errors

- **400:** a list or product field is wrong, like `limit=500`. `message` says which.
- **401:** the sign-in expired, or the key was revoked. Reconnect Eden or make a new key.
- **402:** selling with your own checkout needs a paid Eden plan (Starter or higher).
- **403:** this key can't do that, like a Zapier connection changing a product, or a key with **Store** on **Read** sending a change (`code: "api_key_access"`).
- **404:** no product, sale, or person in this store has that id.
- **409:** it already exists, like a second product for one Custom AI.
- **422:** a field is missing or not allowed, like an unknown `event` or a price below the minimum.
- **429:** too many sales at once. Try again in a minute.
- **500:** something broke on Eden's side. Try again.

A turned-away sale answers `200` with `"ok": false` and a `reason`. The app and a product's sale address share one rate limit, one daily cap, and one event log, so the same order ID sent both ways counts once.
