users.update and variants) call routes that are not in the public contract yet; see the SDK reference.
Interactive API explorer
/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) orAuthorization: Bearer pk_test_...(test data). The key decides the mode, not the dashboard toggle. - JSON requests use
Content-Type: application/json; file uploads usemultipart/form-data. - IDs are MongoDB ObjectId strings (24 hex characters). Payments-partner IDs such as
plan_...,pay_..., andmem_...keep their prefixes. - Money is a decimal amount in major currency units (
29.99), not cents. - Errors are JSON:
{ "message": "..." }, witherror(authentication errors) and sometimes a machine-readablecode. See Errors. - Every authenticated endpoint can also answer
401(invalid key),429(rate limited — 600 requests/minute per account) and500. GET /orders,GET /paymentsandGET /delivered-webhooksare paginated withpageandpageSize(maximum 100); most other lists return everything in one response.
Account
Read the authenticated accountGET /users/me
GET /users/me
subdomain to build storefront and product URLs.Operation ID: getCurrentUserResponsesCheckout
Create hosted checkout links for your products and offersPOST /checkout/sessions
POST /checkout/sessions
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.Customers
Access your customer baseGET /customers
GET /customers
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: listCustomersParametersGET /customers/{id}
GET /customers/{id}
getCustomerParametersDiscounts
Create and manage discount codesGET /discounts
GET /discounts
used (number of sales that used it)Operation ID: listDiscountsResponsesPOST /discounts
POST /discounts
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.GET /discounts/{id}
GET /discounts/{id}
getDiscountParametersPOST /discounts/{id}
POST /discounts/{id}
expiration: null to remove an expiry date. A new code must not clash with another of your discounts.Operation ID: updateDiscountParametersapplication/json
No required fields.DELETE /discounts/{id}
DELETE /discounts/{id}
deleteDiscountParametersGET /discounts/apply/{discountCode}/{productId}
GET /discounts/apply/{discountCode}/{productId}
applyDiscountCodeParametersGET /discounts/check-product/{productId}
GET /discounts/check-product/{productId}
true if any discount applies to the given product, false otherwise.Operation ID: checkProductDiscountsParametersImages
Upload imagesPOST /images
POST /images
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.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.validateLicenseKey, activateLicenseKey,
deactivateLicenseKey, listLicenseKeys, getLicenseKey,
disableLicenseKey, enableLicenseKey, resetLicenseKeyActivations.
Link in Bio
Manage your Link in Bio page (creator page): profile, links, theme and which products it showsGET /creator-pages
GET /creator-pages
getCreatorPageResponsesPOST /creator-pages
POST /creator-pages
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.PUT /creator-pages
PUT /creator-pages
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.DELETE /creator-pages
DELETE /creator-pages
deleteCreatorPageResponsesPATCH /creator-pages/username
PATCH /creator-pages/username
https://{username}.pocketsflow.com).Operation ID: updateCreatorPageUsernameRequest bodyContent type: application/json
Required fields: username.GET /creator-pages/check-username/{username}
GET /creator-pages/check-username/{username}
checkCreatorPageUsernameParametersOrders
View your one-time product ordersGET /orders
GET /orders
GET /payments, and subscribers with GET /subscriptions/subscribers.Operation ID: listOrdersParametersGET /orders/{id}
GET /orders/{id}
_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: getOrderParametersPartners
Become a Pocketsflow partner, refer users, and earn commissionsGET /partners
GET /partners
getPartnerResponsesPOST /partners
POST /partners
createPartnerResponsesPOST /partners/register-referral
POST /partners/register-referral
registerReferralRequest bodyContent type: application/json
Required fields: referralCode.GET /partners/referrals
GET /partners/referrals
listReferralsParametersGET /partners/referrals/sales
GET /partners/referrals/sales
listReferralSalesParametersGET /partners/stats
GET /partners/stats
getPartnerStatsResponsesPayments
Query the unified payment ledger — one-time purchases and subscription renewals — sourced from the payment processorGET /payments
GET /payments
type to narrow to one_time or subscription. Every payment is a Sale. Scoped to the key’s test/live mode.Operation ID: listPaymentsParametersGET /payments/{id}
GET /payments/{id}
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: getPaymentParametersPosts
Create, schedule and send newsletter email campaigns, or send one-off emailsProducts
Create and manage your one-time digital products. Subscription (recurring) offers are a separate resource — see Subscriptions.GET /products
GET /products
GET /subscriptions.Operation ID: listProductsResponsesPOST /products
POST /products
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.GET /products/{id}
GET /products/{id}
GET /subscriptions/{id} instead.Operation ID: getProductParametersDELETE /products/{id}
DELETE /products/{id}
product.deleted webhook. To delete a subscription (recurring) offer, use DELETE /subscriptions/{id}.Operation ID: deleteProductParametersPOST /products/update/{id}
POST /products/update/{id}
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: updateProductParametersapplication/json
No required fields.POST /products/copy/{id}
POST /products/copy/{id}
{ "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: copyProductParametersapplication/json (body optional)
No required fields.Refunds
Refund POLICIES — the refund terms shown to buyers at checkout, referenced by products viarefundPolicy. 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.
GET /refunds
GET /refunds
appliedTo — how many products use itOperation ID: listRefundPoliciesResponsesPOST /refunds
POST /refunds
refundPolicy). This does NOT refund a payment — refunds are issued from the dashboard.Operation ID: createRefundPolicyRequest bodyContent type: application/json
No required fields.GET /refunds/{id}
GET /refunds/{id}
getRefundPolicyParametersPOST /refunds/{id}
POST /refunds/{id}
updateRefundPolicyParametersapplication/json
No required fields.DELETE /refunds/{id}
DELETE /refunds/{id}
deleteRefundPolicyParametersReviews
Read your product reviewsGET /reviews
GET /reviews
listReviewsResponsesSubscribers
Manage your newsletter email contacts and product audiencesSubscriptions
Manage subscription offers (the recurring products you sell) and subscribers (buyers’ memberships). The hosted subscriber portal link is delivered asportalUrl on subscribers and in subscription webhooks — pass it to the buyer unchanged (its token is what allows cancel/resume).
GET /orders/subscriptions/{id}
GET /orders/subscriptions/{id}
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: getSubscriberOrderHistoryParametersGET /subscriptions
GET /subscriptions
GET /subscriptions/subscribers.Operation ID: listSubscriptionOffersResponsesPOST /subscriptions
POST /subscriptions
createSubscriptionOfferRequest bodyContent type: application/json or multipart/form-data
Required fields: name, price, frequency.GET /subscriptions/subscribers
GET /subscriptions/subscribers
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: listSubscribersParametersGET /subscriptions/subscribers/{id}
GET /subscriptions/subscribers/{id}
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: getSubscriberParametersGET /subscriptions/{id}
GET /subscriptions/{id}
getSubscriptionOfferParametersDELETE /subscriptions/{id}
DELETE /subscriptions/{id}
POST /subscriptions/{id}/cancel with a subscriber id for that.Operation ID: deleteSubscriptionOfferParametersPOST /subscriptions/{id}/cancel
POST /subscriptions/{id}/cancel
cancelAtPeriodEnd becomes true. {id} is the subscriber _id or membership id (mem_…) — not a sub_… id.Operation ID: cancelSubscriptionParametersPOST /subscriptions/{id}/pause
POST /subscriptions/{id}/pause
/resume. If the payments partner refuses, nothing changes (502). {id} is the subscriber _id or membership id (mem_…).Operation ID: pauseSubscriptionParametersPOST /subscriptions/{id}/resume
POST /subscriptions/{id}/resume
{id} is the subscriber _id or membership id (mem_…).Operation ID: resumeSubscriptionParametersUpsells
Configure upsell offers shown at checkoutGET /upsells
GET /upsells
salesWithUpsells — your sales that carry an upsellOperation ID: listUpsellsResponsesPOST /upsells
POST /upsells
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.GET /upsells/{id}
GET /upsells/{id}
getUpsellParametersPOST /upsells/{id}
POST /upsells/{id}
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: updateUpsellParametersapplication/json
No required fields.DELETE /upsells/{id}
DELETE /upsells/{id}
deleteUpsellParametersWebhooks
Register endpoints that receive real-time event notifications. Delivery format, headers, signature verification and every event payload are documented in Webhook events.GET /webhooks
GET /webhooks
listWebhooksResponsesPOST /webhooks
POST /webhooks
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.GET /webhooks/{id}
GET /webhooks/{id}
secretOperation ID: getWebhookParametersPATCH /webhooks/{id}
PATCH /webhooks/{id}
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: updateWebhookParametersapplication/json
No required fields.DELETE /webhooks/{id}
DELETE /webhooks/{id}
deleteWebhookParametersPOST /webhooks/{id}/rotate-secret
POST /webhooks/{id}/rotate-secret
rotateWebhookSecretParametersPOST /webhooks/{id}/test
POST /webhooks/{id}/test
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: testWebhookParametersGET /delivered-webhooks
GET /delivered-webhooks
listWebhookDeliveriesParametersGET /delivered-webhooks/{id}
GET /delivered-webhooks/{id}
getWebhookDeliveryParametersPOST /delivered-webhooks/{id}/redeliver
POST /delivered-webhooks/{id}/redeliver
redeliverWebhookParametersObjects
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 catalogOrder
An order as listed byGET /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 (aSale). 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 sellerDiscount
Upsell
A post-purchase / order-bump offer shown at checkout for themainProductIds
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 contactCreatorPage
Your Link in Bio pageUser
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 setmessage; 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.