Skip to main content
This catalog lists every operation in the public OpenAPI contract: 61 paths and 85 operations. Every endpoint requires an API key unless its description says PUBLIC. A few SDK helpers (for example users.update and variants) call routes that are not in the public contract yet; see the SDK reference.

Interactive API explorer

Try requests, inspect schemas, and copy generated examples in Scalar.
The machine-readable contract is available at /docs.json. This page is generated from the same public contract so the catalog does not drift from the deployed API. Every operation has a stable operationId you can use with OpenAPI code generators.

Conventions

  • Base URL: https://api.pocketsflow.com
  • Authentication: Authorization: Bearer pk_live_... (live data) or Authorization: Bearer pk_test_... (test data). The key decides the mode, not the dashboard toggle.
  • JSON requests use Content-Type: application/json; file uploads use multipart/form-data.
  • IDs are MongoDB ObjectId strings (24 hex characters). Payments-partner IDs such as plan_..., pay_..., and mem_... keep their prefixes.
  • Money is a decimal amount in major currency units (29.99), not cents.
  • Errors are JSON: { "message": "..." }, with error (authentication errors) and sometimes a machine-readable code. See Errors.
  • Every authenticated endpoint can also answer 401 (invalid key), 429 (rate limited — 600 requests/minute per account) and 500.
  • GET /orders, GET /payments and GET /delivered-webhooks are paginated with page and pageSize (maximum 100); most other lists return everything in one response.
Keep API keys server-side. Never put a secret key in browser code, a mobile app, a public repository, or a URL.

Account

Read the authenticated account
Retrieve the authenticated account: ids, store name, subdomain, currency, the key’s test/live mode, and whether it can sell. Use subdomain to build storefront and product URLs.Operation ID: getCurrentUserResponsesTry it in the interactive API explorer.

Checkout

Create hosted checkout links for your products and offers
Create a hosted checkout link for a one-time product OR a subscription (recurring) offer — pass either kind of id as productId. Redirect the buyer to the returned url. The link lives on your store subdomain, so your account needs a subdomain first (400 otherwise). Payment methods (card, Apple Pay, Google Pay, Link, ACH, and country-specific methods such as iDEAL) are taken from the seller’s account — there is no payment-method parameter on this endpoint.Operation ID: createCheckoutSessionRequest bodyContent type: application/json Required fields: productId.ResponsesTry it in the interactive API explorer.

Customers

Access your customer base
Retrieve all your customers in the key’s mode (deduplicated by email, each with a computed numberOfOrders and a products array of { _id, name } for every product or subscription they bought). Optionally filter by product (matches any of the buyer’s purchases) and sort. The full list is returned — this endpoint is not paginated.Operation ID: listCustomersParametersResponsesTry it in the interactive API explorer.
Retrieve a customer with their stats, one-time orders, subscriptions and reviewsOperation ID: getCustomerParametersResponsesTry it in the interactive API explorer.

Discounts

Create and manage discount codes
Retrieve all your discount codes in the key’s mode, each with used (number of sales that used it)Operation ID: listDiscountsResponsesTry it in the interactive API explorer.
Create a new discount code. Codes are unique per account and mode (400 if the code exists). mainProductIds must all be your own products or subscription offers in the key’s mode. Set expiration to end a promotion automatically, or active: false to stop it now.Operation ID: createDiscountRequest bodyContent type: application/json Required fields: name, code, value, mainProductIds.ResponsesTry it in the interactive API explorer.
Retrieve one of your discountsOperation ID: getDiscountParametersResponsesTry it in the interactive API explorer.
Partially update a discount — only the fields you send change. Send expiration: null to remove an expiry date. A new code must not clash with another of your discounts.Operation ID: updateDiscountParametersRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Delete a discount codeOperation ID: deleteDiscountParametersResponsesTry it in the interactive API explorer.
PUBLIC (no API key) — used by the checkout. Validates a discount code against a product and returns the discount if it exists, is active, has not expired, and applies to the product. Returns 404 otherwise.Operation ID: applyDiscountCodeParametersResponsesTry it in the interactive API explorer.
PUBLIC (no API key) — used by the checkout. Returns true if any discount applies to the given product, false otherwise.Operation ID: checkProductDiscountsParametersResponsesTry it in the interactive API explorer.

Images

Upload images
Upload an image file as multipart/form-data. The file field must be named image; other field names return 400. PNG, JPEG, GIF, WebP and AVIF are accepted — the type is detected from the file’s bytes, not its name or declared type.Operation ID: uploadImageRequest bodyContent type: multipart/form-data Required fields: image.ResponsesTry it in the interactive API explorer.

Licenses

License keys for software you sell. The three PUBLIC endpoints are called from your app with the product id and the key — no API key, 60 requests per minute per IP. The rest manage your keys with your API key. Full guide, error codes and examples: License keys. Operation IDs: validateLicenseKey, activateLicenseKey, deactivateLicenseKey, listLicenseKeys, getLicenseKey, disableLicenseKey, enableLicenseKey, resetLicenseKeyActivations. Manage your Link in Bio page (creator page): profile, links, theme and which products it shows
Retrieve your Link in Bio page configuration and contentOperation ID: getCreatorPageResponsesTry it in the interactive API explorer.
Create your Link in Bio page. Create-only: if you already have a page this returns 400 — update it with PUT /creator-pages. username is required and also becomes your store subdomain. Send JSON, or multipart/form-data to upload profilePicture, coverImage and images files.Operation ID: createCreatorPageRequest bodyContent type: application/json Required fields: username.ResponsesTry it in the interactive API explorer.
Partially update your Link in Bio page — only the fields you send change. Changing username also moves your store subdomain. JSON or multipart/form-data (file fields profilePicture, coverImage, images).Operation ID: updateCreatorPageRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Delete your Link in Bio page. Your account subdomain is kept.Operation ID: deleteCreatorPageResponsesTry it in the interactive API explorer.
Change only the page username. It also becomes your store subdomain (https://{username}.pocketsflow.com).Operation ID: updateCreatorPageUsernameRequest bodyContent type: application/json Required fields: username.ResponsesTry it in the interactive API explorer.
Check a Link in Bio username / store subdomain before claiming it. Your own current username counts as available.Operation ID: checkCreatorPageUsernameParametersResponsesTry it in the interactive API explorer.

Orders

View your one-time product orders
Retrieve your one-time product orders, newest first, paginated. Subscription (recurring) transactions are NOT included here — list every payment (one-time and recurring) with GET /payments, and subscribers with GET /subscriptions/subscribers.Operation ID: listOrdersParametersResponsesTry it in the interactive API explorer.
Retrieve one order by its sale id (the _id of an order from GET /orders, or of a payment from GET /payments) — NOT a product id. For a subscription membership and its full payment history, use GET /orders/subscriptions/{id} with the subscriber id.Operation ID: getOrderParametersResponsesTry it in the interactive API explorer.

Partners

Become a Pocketsflow partner, refer users, and earn commissions
Retrieve your partner profile including referral code and denormalized stats.Operation ID: getPartnerResponsesTry it in the interactive API explorer.
Register as a Pocketsflow partner. You’ll receive a unique referral code to share. When users sign up using your code, you earn commissions on their sales.Operation ID: createPartnerResponsesTry it in the interactive API explorer.
Call this after a user signs up through a partner’s referral link. Sets the referral code on the authenticated user and increments the partner’s signup count. Only accounts created within the last 30 days can attach a referral code, and never their own.Operation ID: registerReferralRequest bodyContent type: application/json Required fields: referralCode.ResponsesTry it in the interactive API explorer.
List all users who signed up using your referral code. Each user includes their live sales count and total revenue in USD.Operation ID: listReferralsParametersResponsesTry it in the interactive API explorer.
Get the live sales of users who signed up through your referral code (test-mode and refunded sales excluded), newest first. Each item carries the seller, amounts, USD revenue and your commission — never buyer data.Operation ID: listReferralSalesParametersResponsesTry it in the interactive API explorer.
Get live-computed aggregated stats: total signups, total sales, total revenue, and total commission earned based on your commission rate.Operation ID: getPartnerStatsResponsesTry it in the interactive API explorer.

Payments

Query the unified payment ledger — one-time purchases and subscription renewals — sourced from the payment processor
Retrieve a paginated ledger of ALL payments — one-time product purchases AND subscription payments (the initial charge plus every renewal). Filter by type to narrow to one_time or subscription. Every payment is a Sale. Scoped to the key’s test/live mode.Operation ID: listPaymentsParametersResponsesTry it in the interactive API explorer.
Retrieve a single payment (a Sale). Resolves the related product OR subscription offer (subscription payments carry an empty productId), the customer, and a paymentsPartner block sourced from the stored payments partner payload. Pass ?live=true to additionally fetch the authoritative live payment from the payments partner as paymentsPartnerLive (degrades gracefully on any error — never fails the request).Operation ID: getPaymentParametersResponsesTry it in the interactive API explorer.

Posts

Create, schedule and send newsletter email campaigns, or send one-off emails
Retrieve your newsletter posts, newest first, optionally only one status. Not paginated.Operation ID: listPostsParametersResponsesTry it in the interactive API explorer.
Create a newsletter post. Requires newsletter settings (sender) to be configured first. A post is a draft unless you send status: "scheduled" with scheduledAt (queued for that time) or status: "automation". Sender address, from name and reply-to default to your newsletter settings. Send it now with POST /newsletters/posts/{id}/send.Operation ID: createPostRequest bodyContent type: application/json Required fields: name.ResponsesTry it in the interactive API explorer.
Retrieve one of your newsletter posts (a malformed id answers 404)Operation ID: getPostParametersResponsesTry it in the interactive API explorer.
Partially update a post — only the fields you send change. Sent posts cannot be edited (400). Setting status: "scheduled" with scheduledAt (re)queues the post after the send-allowance check; moving a scheduled post to draft unschedules it.Operation ID: updatePostParametersRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Delete a newsletter post (a scheduled post is unscheduled first). Returns the deleted post.Operation ID: deletePostParametersResponsesTry it in the interactive API explorer.
Queue the post for immediate delivery to its audience (sendToAll, subscriberIds, productIds, tags). The post moves to sending, then sent (or failed). Requires a verified sender email. Calling it again while the post is sending is a no-op (Post is already sending).Operation ID: sendPostParametersResponsesTry it in the interactive API explorer.
Send an email to up to 100 recipients programmatically. Requires a verified sender email (configure it in Newsletters → Settings). The email is sent with your standard footer, physical address, and unsubscribe link, and is recorded as a sent post (source: api). Recipients who unsubscribed from you are skipped (listed in skipped); the rest count against your monthly send allowance.Operation ID: sendEmailRequest bodyContent type: application/json Required fields: to, subject.ResponsesTry it in the interactive API explorer.

Products

Create and manage your one-time digital products. Subscription (recurring) offers are a separate resource — see Subscriptions.
Retrieve your one-time products in the key’s mode, newest first. Returns a bare array (not paginated). Subscription (recurring) offers are a separate resource — list them with GET /subscriptions.Operation ID: listProductsResponsesTry it in the interactive API explorer.
Create a new one-time product. Send JSON, or multipart/form-data to upload file, thumbnail and images. Pay-what-you-want products (payWant: true) must also send hasProductPage: "yes". Fires the product.created webhook.Operation ID: createProductRequest bodyContent type: application/json Required fields: name.ResponsesTry it in the interactive API explorer.
Retrieve one of your one-time products. A subscription (recurring) offer’s id 404s here with a hint — fetch it with GET /subscriptions/{id} instead.Operation ID: getProductParametersResponsesTry it in the interactive API explorer.
Delete one of your one-time products. Fires the product.deleted webhook. To delete a subscription (recurring) offer, use DELETE /subscriptions/{id}.Operation ID: deleteProductParametersResponsesTry it in the interactive API explorer.
Partially update one of your one-time products — send only the fields to change (JSON or multipart/form-data). If the request sets payWant: true it must also send hasProductPage: "yes". Fires the product.updated webhook. Subscription (recurring) offers cannot be updated with an API key.Operation ID: updateProductParametersRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Duplicate one of your one-time products (or a subscription offer, whichever owns the id) as a NEW item. Send { "testMode": false } to copy a test-mode offer into live mode (“Copy to live”); omit the body to copy within the same mode. The copy gets a deduplicated “Name (Copy)” name and starts unpublished when copied into live mode.Operation ID: copyProductParametersRequest bodyContent type: application/json (body optional) No required fields.ResponsesTry it in the interactive API explorer.

Refunds

Refund POLICIES — the refund terms shown to buyers at checkout, referenced by products via refundPolicy. These endpoints do not refund payments: refunding a payment is done from the dashboard and has no API-key endpoint. Refunds that happen arrive as the order.refunded webhook and isRefunded on payments.
Retrieve your refund POLICIES in the key’s mode, newest first, each with appliedTo — how many products use itOperation ID: listRefundPoliciesResponsesTry it in the interactive API explorer.
Create a refund POLICY (refund terms shown at checkout) that products reference by id (refundPolicy). This does NOT refund a payment — refunds are issued from the dashboard.Operation ID: createRefundPolicyRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
PUBLIC (no API key) — retrieve a refund POLICY by its id. Checkout renders it for buyers.Operation ID: getRefundPolicyParametersResponsesTry it in the interactive API explorer.
Update one of your refund POLICIES — only the fields you send change.Operation ID: updateRefundPolicyParametersRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Delete one of your refund POLICIES. Returns the deleted policy. Products that referenced it keep the stale id — update them.Operation ID: deleteRefundPolicyParametersResponsesTry it in the interactive API explorer.

Reviews

Read your product reviews
Retrieve all reviews across your products in the key’s mode, newest first. Not paginated; filtering is not supported.Operation ID: listReviewsResponsesTry it in the interactive API explorer.

Subscribers

Manage your newsletter email contacts and product audiences
Every product and subscription in the key’s mode, with how many people bought it (customers) and how many of them are active email contacts (subscribers). Biggest audiences first.Operation ID: listProductAudiencesResponsesTry it in the interactive API explorer.
Adds everyone who bought the product (or every buyer, when productId is omitted) to your subscribers and links them to what they bought. Contacts who unsubscribed stay unsubscribed.Operation ID: syncProductAudienceRequest bodyContent type: application/json (body optional) No required fields.ResponsesTry it in the interactive API explorer.
Retrieve all your newsletter contacts, newest first. Each carries productIds: the products and subscriptions they bought. Not paginated.Operation ID: listEmailSubscribersParametersResponsesTry it in the interactive API explorer.
Retrieve one of your newsletter contactsOperation ID: getEmailSubscriberParametersResponsesTry it in the interactive API explorer.
Delete a contact from your list. Returns the deleted contact.Operation ID: deleteEmailSubscriberParametersResponsesTry it in the interactive API explorer.

Subscriptions

Manage subscription offers (the recurring products you sell) and subscribers (buyers’ memberships). The hosted subscriber portal link is delivered as portalUrl on subscribers and in subscription webhooks — pass it to the buyer unchanged (its token is what allows cancel/resume).
Retrieve a single subscriber (SubscriptionCustomer) by id together with its subscription offer, customer, legacy card-subscription data (when applicable), the payments-partner-sourced live status, and payments — every subscription Sale for this membership (the initial charge plus every renewal). {id} is the subscriber _id; a malformed or unknown id answers 404.Operation ID: getSubscriberOrderHistoryParametersResponsesTry it in the interactive API explorer.
Retrieve all of your subscription OFFERS (the recurring products you sell) in the key’s mode. To list your subscribers (buyers) instead, use GET /subscriptions/subscribers.Operation ID: listSubscriptionOffersResponsesTry it in the interactive API explorer.
Create a recurring subscription offer. Accepts JSON for API clients and multipart/form-data when uploading files or images. Pricing is charged in USD while multi-currency is disabled.Operation ID: createSubscriptionOfferRequest bodyContent type: application/json or multipart/form-data Required fields: name, price, frequency.ResponsesTry it in the interactive API explorer.
Retrieve a paginated list of your subscribers (buyers with a membership in one of your subscription offers). Each subscriber carries a payments-partner-sourced live status, cancelAtPeriodEnd, the membership id (membershipId), the portalUrl to hand to the buyer, and the joined subscription offer. Scoped to the key’s test/live mode.Operation ID: listSubscribersParametersResponsesTry it in the interactive API explorer.
Retrieve a single subscriber, its subscription offer, the customer record, the payments-partner-sourced live status, and its full payment history (payments = every subscription Sale — the initial charge plus every renewal). Pass ?live=true to additionally fetch the authoritative membership status from the payments partner as membership (degrades gracefully to the stored status on any payments partner error — never fails the request).Operation ID: getSubscriberParametersResponsesTry it in the interactive API explorer.
Retrieve one of your subscription OFFERS in the key’s mode.Operation ID: getSubscriptionOfferParametersResponsesTry it in the interactive API explorer.
Delete one of your subscription OFFERS in the key’s mode. This removes the offer from your catalog; it does not cancel existing subscribers — use POST /subscriptions/{id}/cancel with a subscriber id for that.Operation ID: deleteSubscriptionOfferParametersResponsesTry it in the interactive API explorer.
Schedules the subscriber’s membership to cancel at the end of the current billing period (same as the subscriber portal). Access continues until then; cancelAtPeriodEnd becomes true. {id} is the subscriber _id or membership id (mem_…) — not a sub_… id.Operation ID: cancelSubscriptionParametersResponsesTry it in the interactive API explorer.
Pauses payment collection on the subscriber’s membership. The buyer keeps access and is not charged until /resume. If the payments partner refuses, nothing changes (502). {id} is the subscriber _id or membership id (mem_…).Operation ID: pauseSubscriptionParametersResponsesTry it in the interactive API explorer.
Restarts payment collection on a paused membership, or otherwise reverses a pending cancel-at-period-end (same as the subscriber portal). {id} is the subscriber _id or membership id (mem_…).Operation ID: resumeSubscriptionParametersResponsesTry it in the interactive API explorer.

Upsells

Configure upsell offers shown at checkout
Retrieve your upsells in the key’s mode, plus salesWithUpsells — your sales that carry an upsellOperation ID: listUpsellsResponsesTry it in the interactive API explorer.
Create a new upsell offer. upsellProductId must be one of your products (404 otherwise) and mainProductIds a non-empty list of your own products in the key’s mode (400 otherwise). upsellPrice must be 0 or more.Operation ID: createUpsellRequest bodyContent type: application/json Required fields: mainProductIds, upsellProductId, upsellPrice.ResponsesTry it in the interactive API explorer.
Retrieve one of your upsellsOperation ID: getUpsellParametersResponsesTry it in the interactive API explorer.
Update an existing upsell. upsellProductId, upsellPrice and mainProductIds change only when sent (and are validated like on create); every other listed field is written as sent — omitted ones are cleared — so send every text, style and active field you want to keep. PUT /upsells/{id} is an alias of this endpoint.Operation ID: updateUpsellParametersRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Delete an upsell offerOperation ID: deleteUpsellParametersResponsesTry it in the interactive API explorer.

Webhooks

Register endpoints that receive real-time event notifications. Delivery format, headers, signature verification and every event payload are documented in Webhook events.
Retrieve your webhook endpoints in the key’s mode, newest first. Secrets are omitted.Operation ID: listWebhooksResponsesTry it in the interactive API explorer.
Register an endpoint that receives the selected events. The endpoint is created in the key’s mode and only receives events from that mode. The response carries the signing secret — store it (you can also read it with GET /webhooks/{id} or replace it with POST /webhooks/{id}/rotate-secret). New webhooks start active; use PATCH /webhooks/{id} to disable one.Operation ID: createWebhookRequest bodyContent type: application/json Required fields: url, events.ResponsesTry it in the interactive API explorer.
Retrieve one of your webhook endpoints, including its signing secretOperation ID: getWebhookParametersResponsesTry it in the interactive API explorer.
Update an endpoint’s url, events, description, or active flag. Only the fields you send change; they are validated like on create. The response does not include the secret.Operation ID: updateWebhookParametersRequest bodyContent type: application/json No required fields.ResponsesTry it in the interactive API explorer.
Delete one of your webhook endpoints in the key’s mode.Operation ID: deleteWebhookParametersResponsesTry it in the interactive API explorer.
Replace the endpoint’s signing secret and return the new one. Deliveries are signed with the new secret immediately — update your verifier first.Operation ID: rotateWebhookSecretParametersResponsesTry it in the interactive API explorer.
Send a sample event to this endpoint only — its first subscribed event type, with a sample order.completed-style payload and test: true in the body — and return the delivery outcome. The attempt is recorded in the delivery log.Operation ID: testWebhookParametersResponsesTry it in the interactive API explorer.
The delivery log: every webhook delivery attempt in the key’s mode (including tests and redeliveries), newest first, paginated. Entries are kept for 30 days.Operation ID: listWebhookDeliveriesParametersResponsesTry it in the interactive API explorer.
Retrieve one delivery-log entry, including the exact body that was sent.Operation ID: getWebhookDeliveryParametersResponsesTry it in the interactive API explorer.
Send a logged delivery’s stored body to its endpoint again (same event id, freshly signed) and record the new attempt. Use it to replay events your endpoint missed.Operation ID: redeliverWebhookParametersResponsesTry it in the interactive API explorer.

Objects

The main response objects. Fields marked as money are decimal amounts in major currency units (e.g. 29.99), never cents, unless the field name ends in Cents.

Product

A one-time product in your catalog

Order

An order as listed by GET /orders: the one-time Sale plus its product, customer reference, fee breakdown and purchased upsells. Includes every field of Payment and OrderFees, plus:

OrderFees

Seller-facing fee breakdown attached to orders. All decimal amounts in the sale currency.

Payment

A single payment (a Sale). Covers BOTH one-time product purchases (isSubscription: false) and subscription payments — the initial charge and every renewal (isSubscription: true). Money fields are decimal amounts in currency, not cents.

Customer

A buyer of yours. One record per buyer email and test/live mode.

Subscriber

A subscriber — a buyer’s membership (SubscriptionCustomer) in one of your subscription offers.

SubscriptionOffer

A recurring subscription offer owned by the authenticated seller

Discount

Upsell

A post-purchase / order-bump offer shown at checkout for the mainProductIds

Review

RefundPolicy

A refund policy — the refund terms shown to buyers at checkout. Products reference it by id (refundPolicy). Not a refund of a payment.

CheckoutSession

Webhook

WebhookDelivery

One delivery attempt from the webhook delivery log (kept for 30 days)

WebhookEvent

The JSON body of an outgoing webhook delivery (not an API response). The envelope fields sit at the top level next to the event’s own fields — see the Webhook events section for headers and signature verification.

Post

A newsletter post (email campaign)

EmailSubscriber

A newsletter contact

CreatorPage

Your Link in Bio page

User

The authenticated account. Only integrator-relevant fields are listed; other dashboard-internal fields may appear and can change without notice — don’t rely on them.

Pagination

Error

Error body. Most endpoints set message; authentication errors set both error and message; some add a machine-readable code. Read message first and fall back to error.

Need a typed client?

Use the Pocketsflow Node.js SDK for typed server-side calls, or import /docs.json into your preferred OpenAPI generator.