MisarMisar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisarSEOMisar PlatformMisar SSO
API Reference

Marketplace

Browse, install, and sell email templates in the MisarMail marketplace

The MisarMail Marketplace is a catalog of community and officially-created email templates — including single emails, campaign templates, and automation sequences. Free templates install instantly; paid templates are sold through Stripe Checkout, and sellers keep 70% of every sale.

A template's category is one of:

email · campaign · automation · welcome · newsletter · promotional · transactional · ecommerce · saas · event · other

Authentication

Browsing endpoints (list, detail, and the public review list) require no authentication. Installing, purchasing, reviewing, listing/selling, and all payout endpoints use session (cookie-based) authentication. Base URL: https://api.misar.io/mail.

Template detail and purchase endpoints accept either a template UUID (legacy links) or its SEO slug in the :slug path segment.

List marketplace templates

GET/mail/api/marketplace

Browse published templates. Items with price_cents: 0 are free.

Query parameters

categorystringquery

Filter by a single category (see list above).

typeemail | campaign | automationquery

Coarse type filter. email excludes campaign/automation categories.

sortpopular | newest | rating | pricequerydefault: popular

Sort order. popular sorts by downloads.

freetrue | falsequery

Pass true to return only free templates.

pageintegerquerydefault: 1

Page number.

limitintegerquerydefault: 20

Items per page (max 100).

Response fields

successboolean

true when the request succeeded.

dataArray<Template>

Templates. Each includes id, slug, title, description, category, tags, price_cents, preview_image_url, downloads, rating_avg, rating_count, is_featured, created_at, seller_name, and preview_html.

paginationobject

page, limit, total, and totalPages.

curl "https://api.misar.io/mail/api/marketplace?category=newsletter&sort=popular&page=1&limit=20"
{
  "success": true,
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "slug": "minimal-weekly-digest",
      "title": "Minimal Weekly Digest",
      "description": "A clean, single-column digest template with section separators and a CTA block.",
      "category": "newsletter",
      "tags": ["minimal", "digest", "weekly"],
      "price_cents": 0,
      "preview_image_url": "https://cdn.misarmail.com/marketplace/minimal-weekly-digest.png",
      "downloads": 4210,
      "rating_avg": 4.8,
      "rating_count": 132,
      "is_featured": true,
      "created_at": "2026-05-01T09:00:00Z",
      "seller_name": "MisarMail",
      "preview_html": "<table>...</table>"
    }
  ],
  "pagination": { "page": 1, "limit": 20, "total": 87, "totalPages": 5 }
}

Get template details

GET/mail/api/marketplace/:slug

Fetch a single published template with its reviews and similar templates. Accepts a UUID or a slug.

Path parameters

slugstringpathrequired

Template slug or UUID.

Response fields

successboolean

true when the request succeeded.

dataobject

The template (id, template_id, title, description, category, tags, price_cents, preview_image_url, downloads, rating_avg, rating_count, is_featured, slug, created_at) plus preview_html, seller_name, reviews (up to 20), and similar (up to 4 in the same category).

curl https://api.misar.io/mail/api/marketplace/minimal-weekly-digest
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "template_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "title": "Minimal Weekly Digest",
    "description": "A clean, single-column digest template...",
    "category": "newsletter",
    "tags": ["minimal", "digest", "weekly"],
    "price_cents": 0,
    "preview_image_url": "https://cdn.misarmail.com/marketplace/minimal-weekly-digest.png",
    "downloads": 4210,
    "rating_avg": 4.8,
    "rating_count": 132,
    "is_featured": true,
    "slug": "minimal-weekly-digest",
    "created_at": "2026-05-01T09:00:00Z",
    "preview_html": "<table>...</table>",
    "seller_name": "MisarMail",
    "reviews": [],
    "similar": []
  }
}

Install a free template

POST/mail/api/marketplace/:slug/download

Install a template into your own template library. The template's content is copied into your account (for automation templates, per-step email templates are created too) and returns the new template_id. You must have access: the template must be free, already purchased, or one you sell. Session required.

Path parameters

slugstringpathrequired

Template slug or UUID.

Response fields

successboolean

true when the template was installed.

template_idstring

UUID of the copy created in your library.

step_template_idsobject

For automation templates only — a map of step index to the created step template UUIDs.

curl -X POST https://api.misar.io/mail/api/marketplace/minimal-weekly-digest/download \
  -H "Cookie: session=..."
{
  "success": true,
  "template_id": "c3d4e5f6-a7b8-9012-cdef-345678901234"
}

Installing is idempotent per template name — installing a template you already have returns the existing copy's template_id rather than creating a duplicate. For paid templates you must purchase first, otherwise download returns 403 Purchase required.

Purchase a paid template

POST/mail/api/marketplace/:slug/purchase

Purchase a paid template. Free templates are recorded immediately and return { "free": true }. Paid templates return a Stripe Checkout URL — redirect the buyer to it; the purchase is recorded by the Stripe webhook on successful payment. After purchase, install the template with the download endpoint. Session required.

Path parameters

slugstringpathrequired

Template slug or UUID.

Response fields

successboolean

true when the request succeeded.

freeboolean

true and no url when the template is free (purchase recorded immediately).

urlstring

Stripe Checkout URL for paid templates — redirect the buyer here.

curl -X POST https://api.misar.io/mail/api/marketplace/dark-mode-digest/purchase \
  -H "Cookie: session=..."
{
  "success": true,
  "url": "https://checkout.stripe.com/c/pay/cs_test_..."
}
{
  "success": true,
  "free": true
}

Error cases:

ErrorHTTPMeaning
Template not found404No published template with that slug/ID
Cannot purchase your own template400You are the seller
Already purchased409You already own this template

List reviews

GET/mail/api/marketplace/:slug/review

Public list of a template's reviews, newest first (up to 50). No authentication required.

Path parameters

slugstringpathrequired

Template slug or UUID.

Response fields

successboolean

true when the request succeeded.

dataArray<Review>

Reviews, each with id, user_id, rating, review, and created_at.

curl https://api.misar.io/mail/api/marketplace/minimal-weekly-digest/review

Submit a review

POST/mail/api/marketplace/:slug/review

Submit or update a rating for a template. One review per user per template (submitting again updates your existing review). You cannot review your own template, and for paid templates you must have purchased it first. Session required.

Path parameters

slugstringpathrequired

Template slug or UUID.

Request body

ratingintegerbodyrequired

1–5.

reviewstringbody

Optional written review (max 2000 characters).

Response fields

successboolean

true when the review was saved.

dataobject

The created/updated review row.

{
  "rating": 5,
  "review": "Excellent template — renders perfectly in Gmail and Apple Mail."
}
{
  "success": true,
  "data": {
    "id": "d4e5f6a7-b8c9-0123-def4-56789012345a",
    "marketplace_template_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "user_id": "e5f6a7b8-c9d0-1234-ef56-789012345abc",
    "rating": 5,
    "review": "Excellent template...",
    "created_at": "2026-06-01T12:00:00Z"
  }
}

Error cases:

ErrorHTTPMeaning
Cannot review your own template400You are the seller
Purchase required to leave a review403Paid template you have not purchased
Template not found404No published template with that slug/ID

List one of your existing templates

POST/mail/api/marketplace

List an email template you already own as a marketplace listing. Free listings publish instantly; paid listings publish only once you have an active payout account (see Seller payouts) — until then they stay pending and auto-publish when your Stripe Connect account becomes active. Session required.

Request body

template_idstringbodyrequired

UUID of one of your email templates.

titlestringbodyrequired

Listing title (3–100 characters).

descriptionstringbodyrequired

10–1000 characters.

categorystringbodyrequired

One of the marketplace categories.

price_centsintegerbodyrequired

0 for free, up to 100000. Paid listings require a payout account before going live.

tagsstring[]body

Up to 10 tags (each max 30 chars).

preview_image_urlstringbody

Optional HTTPS preview image URL.

Response fields

successboolean

true when the listing was created.

dataobject

The created marketplace_templates row.

pending_reviewboolean

true when the listing is not yet published (paid listing awaiting an active payout account).

needs_payout_connectboolean

true when a paid listing is blocked because you have no active payout account.

{
  "template_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "title": "Dark Mode Digest",
  "description": "A sleek dark-mode newsletter template optimised for Apple Mail dark mode.",
  "category": "newsletter",
  "price_cents": 499,
  "tags": ["dark-mode", "digest", "premium"]
}
{
  "success": true,
  "data": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "title": "Dark Mode Digest", "price_cents": 499, "is_published": false },
  "pending_review": true,
  "needs_payout_connect": true
}

Submit a community template for review

POST/mail/api/marketplace/submit

Submit raw template HTML to the community review queue. Submissions are stored with status pending and reviewed by the MisarMail team before going live. Session required. GET /api/marketplace/submit lists your own submissions (paginated).

Request body

template_namestringbodyrequired

3–100 characters.

template_htmlstringbodyrequired

The template HTML (50–500,000 characters).

template_descriptionstringbody

10–1000 characters.

categorystringbody

One of the marketplace categories.

tagsstring[]body

Up to 10 tags (each max 30 chars).

preview_image_urlstringbody

Optional HTTPS preview image URL.

Response fields

successboolean

true when the submission was accepted.

dataobject

The created template_submissions row, including id, status (pending), reviewer_notes, reviewed_at, and created_at.

messagestring

Human-readable status message.

{
  "template_name": "Dark Mode Digest",
  "template_html": "<table>...</table>",
  "template_description": "A sleek dark-mode newsletter template.",
  "category": "newsletter",
  "tags": ["dark-mode", "digest"]
}
{
  "success": true,
  "data": {
    "id": "f6a7b8c9-d0e1-2345-f678-90123456789a",
    "template_name": "Dark Mode Digest",
    "status": "pending",
    "reviewer_notes": null,
    "reviewed_at": null,
    "created_at": "2026-06-01T12:00:00Z"
  },
  "message": "Your template has been submitted for review. We'll notify you once it's approved."
}

My listings

GET/mail/api/marketplace/my

Returns the listings you have published to the marketplace (as a seller), newest first. Session required. PATCH /api/marketplace/my toggles a listing's is_published (body: { id, is_published }).

Response fields

successboolean

true when the request succeeded.

dataArray<Listing>

Your listings, each with id, title, description, category, tags, price_cents, preview_image_url, downloads, rating_avg, rating_count, is_published, is_featured, created_at, and preview_html.

curl https://api.misar.io/mail/api/marketplace/my \
  -H "Cookie: session=..."

Seller payouts

When you sell paid templates you keep 70% of every sale; MisarMail retains 30%. The platform collects the full payment at checkout and your share accrues as an available balance. To receive your money you connect a Stripe Connect Express account — Stripe securely handles your bank details, identity verification, and tax information. You then withdraw your balance on demand, or enable automatic payouts.

A paid template only goes live once you have an active payout account (so the 70% always has a destination). Free templates publish immediately. A paid listing auto-publishes the moment your Stripe Connect account becomes active.

Connect / onboarding status

GET/mail/api/marketplace/connect

Returns your Stripe Connect onboarding status. Session required. Pass ?refresh=1 to re-sync the latest status from Stripe (used on return from the onboarding flow).

Query parameters

refreshintegerquery

Pass 1 to re-sync the latest status from Stripe.

Response fields

successboolean

true when the request succeeded.

connectedboolean

Whether a Stripe Connect account exists. Response also includes charges_enabled, payouts_enabled, details_submitted, and country.

curl https://api.misar.io/mail/api/marketplace/connect \
  -H "Cookie: session=..."
{
  "success": true,
  "connected": true,
  "charges_enabled": true,
  "payouts_enabled": true,
  "details_submitted": true,
  "country": "US"
}

Start / resume onboarding

POST/mail/api/marketplace/connect

Creates a Stripe Connect Express account on first use and returns a Stripe-hosted onboarding URL. Once fully onboarded, returns an Express dashboard login link instead. Session required.

Response fields

successboolean

true when the request succeeded.

urlstring

Stripe-hosted onboarding or dashboard URL.

typestring

"onboarding" while setup is incomplete, or "dashboard" once the account is active.

curl -X POST https://api.misar.io/mail/api/marketplace/connect \
  -H "Cookie: session=..."
{
  "success": true,
  "url": "https://connect.stripe.com/setup/e/acct_123/...",
  "type": "onboarding"
}

Earnings summary

GET/mail/api/marketplace/earnings

Returns lifetime totals, available balance, connect status, recent sales (up to 100), and payout history. Session required. Pass ?format=csv to download the sales ledger as CSV.

Query parameters

formatstringquery

Pass csv to download the sales ledger as CSV.

Response fields

successboolean

true when the request succeeded.

summaryobject

lifetime_gross_cents, lifetime_fees_cents, lifetime_net_cents, available_cents, total_sales, and min_withdrawal_cents.

connectobject

connected, payouts_enabled, details_submitted, auto_payout_enabled, auto_payout_threshold_cents, and auto_payout_frequency.

salesArray<Sale>

Recent sales, each with id, created_at, title, price_cents, platform_fee_cents, seller_payout_cents, and paid_out.

payoutsArray<Payout>

Payout history.

curl https://api.misar.io/mail/api/marketplace/earnings \
  -H "Cookie: session=..."
{
  "success": true,
  "summary": {
    "lifetime_gross_cents": 12000,
    "lifetime_fees_cents": 3600,
    "lifetime_net_cents": 8400,
    "available_cents": 4200,
    "total_sales": 12,
    "min_withdrawal_cents": 1000
  },
  "connect": {
    "connected": true,
    "payouts_enabled": true,
    "details_submitted": true,
    "auto_payout_enabled": false,
    "auto_payout_threshold_cents": 5000,
    "auto_payout_frequency": "monthly"
  },
  "sales": [
    {
      "id": "a7b8c9d0-e1f2-3456-a789-0123456789ab",
      "created_at": "2026-06-01T10:00:00Z",
      "title": "Dark Mode Digest",
      "price_cents": 1000,
      "platform_fee_cents": 300,
      "seller_payout_cents": 700,
      "paid_out": false
    }
  ],
  "payouts": []
}

Withdraw (create payout)

POST/mail/api/marketplace/payouts

Withdraws your full available balance to your connected account via a Stripe Transfer. The minimum withdrawal is $10.00 (min_withdrawal_cents). Session required.

Response fields

successboolean

true when the payout was created.

payout_idstring

ID of the created payout.

amount_centsinteger

Amount withdrawn, in cents.

curl -X POST https://api.misar.io/mail/api/marketplace/payouts \
  -H "Cookie: session=..."
{
  "success": true,
  "payout_id": "b8c9d0e1-f2a3-4567-b890-123456789abc",
  "amount_cents": 4200
}

Error cases:

ErrorHTTPMeaning
Connect a payout account before withdrawing400No active Stripe Connect account
Balance / validation error400Available balance below the minimum, etc.
Transfer failed502Stripe transfer error; claimed earnings are released back to your balance

Withdrawals are atomic: your earnings are claimed before the transfer and, if the transfer fails, automatically released back to your available balance so nothing is ever lost.

Payout history

GET/mail/api/marketplace/payouts

Returns up to 200 payout records, newest first. Session required.

Response fields

successboolean

true when the request succeeded.

dataArray<Payout>

Payout records, each with id, amount_cents, currency, status, stripe_transfer_id, line_item_count, trigger, failure_reason, created_at, and paid_at.

curl https://api.misar.io/mail/api/marketplace/payouts \
  -H "Cookie: session=..."

Get automatic payout settings

GET/mail/api/marketplace/payouts/settings

Returns your scheduled automatic payout settings. Session required.

Response fields

successboolean

true when the request succeeded.

auto_payout_enabledboolean

Whether scheduled payouts are enabled. Response also includes auto_payout_threshold_cents and auto_payout_frequency.

curl https://api.misar.io/mail/api/marketplace/payouts/settings \
  -H "Cookie: session=..."
{
  "success": true,
  "auto_payout_enabled": false,
  "auto_payout_threshold_cents": 5000,
  "auto_payout_frequency": "monthly"
}

Update automatic payout settings

PATCH/mail/api/marketplace/payouts/settings

Configure scheduled automatic payouts of your balance. Requires an active payout account (returns 400 otherwise). Session required.

Request body

auto_payout_enabledbooleanbody

Enable/disable scheduled payouts.

threshold_centsintegerbody

Minimum balance to trigger a payout ($10–$1,000,000 → 1000–1000000 cents).

frequencyweekly | biweekly | monthlybody

Payout frequency.

curl -X PATCH https://api.misar.io/mail/api/marketplace/payouts/settings \
  -H "Cookie: session=..." \
  -H "Content-Type: application/json" \
  -d '{ "auto_payout_enabled": true, "threshold_cents": 5000, "frequency": "monthly" }'

Status codes

CodeMeaning
200Request succeeded
201Listing / submission / review created
400Validation failed, own-template action, or missing payout account
401Not authenticated
403Purchase required (download or review of a paid template)
404Template not found
409Already purchased
429Rate limit exceeded
502Stripe transfer failed (payout)