TagMangoTagMango Docs
Mango

Create Mango

POST
/api/v1/external/mangos

Create a new Mango for the authenticated creator. Unknown request fields are stripped by the external v1 validation pipeline.

Types: onetime (single purchase), recurring (subscription), free (no payment).

Description: Provide exactly one of plain description or rich descriptionHtml. Rich HTML is sanitized with the dashboard formatting policy; both forms are returned.

Pricing: price is in the creator's currency. When settings.priceIncludesGST is true, price and differentialPricing are buyer-visible GST-inclusive values; the response returns those same gross semantics. Omitted differential currencies are auto-converted. pricing.strikeThrough remains buyer-visible and every non-primary currency requires the matching explicit differential price.

Access: access.validityDays is non-recurring (free or paid one-time). trialDays and maxBillingCycles are recurring only. Multiple quantity is limited to paid one-time Mangoes. Detail responses preserve the exact persisted startsAt; omit or replace a past value before cloning.

Media: coverContents accepts at most 10 absolute URLs whose paths end in JPG, JPEG, PNG, WebP, GIF, MP4, or WebM. HTTP and private-host URLs are accepted; the API does not perform DNS, redirect, availability, MIME, file-size, or other network validation.

Validation rules:

  • free type must not include paid pricing or enable GST, strike-through, trials, billing caps, or multiple quantity.
  • recurring type requires recurringType (monthly, quarterly, halfyearly, yearly).
  • onetime type must not include recurringType.
  • Offshore creators must enable GST. TagMango automatically adds the required postal-code checkout field.
  • HTML tags are stripped from title and plain description.

Create and owner-detail responses share one additive clone-ready representation. Existing flat response aliases remain for compatibility; new configuration is under settings, pricing, and access.

The response includes checkoutLink (always present) and shortLink (present once generated), both built on your x-whitelabel-host.

A 409 IMPACTED_COUPONS_FOUND response includes impactedCoupons — the conflicting coupons as {code, flatDiscount, currency, validTill}.

AuthorizationBearer <token>

In: header

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api-prod-new.tagmango.com/api/v1/external/mangos" \  -H "x-whitelabel-host: string" \  -H "Content-Type: application/json" \  -d '{    "title": "Premium Fitness Course",    "type": "onetime"  }'
{
  "code": 201,
  "result": {
    "_id": "66a1390268a76f2f5c9f39a3",
    "creator": "77b2390268a76f2f5c9f39a4",
    "title": "Premium Fitness Course",
    "description": "A 12-week fitness transformation program.",
    "descriptionHtml": "<p>A <strong>12-week</strong> fitness transformation program.</p>",
    "price": 1180,
    "currency": "INR",
    "inrAmount": 999,
    "usdAmount": 12,
    "eurAmount": 11,
    "isDeleted": false,
    "isHidden": false,
    "recurringType": "onetime",
    "isPublic": true,
    "isFree": true,
    "zeroCostMango": true,
    "affiliateEnabled": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "coverContents": [
      "https://cdn.example.com/cover.webp"
    ],
    "checkoutLink": "https://creator.example.com/web/checkout/66a1390268a76f2f5c9f39a3?purchaseNow=true",
    "shortLink": "https://creator.example.com/l/premium-fitness",
    "type": "onetime",
    "differentialPricing": {
      "inr": 999,
      "usd": 12,
      "eur": 11
    },
    "settings": {
      "includeGST": false,
      "priceIncludesGST": false,
      "otpless": false,
      "showTdsField": false
    },
    "pricing": {
      "strikeThrough": {
        "inr": 1499,
        "usd": 18,
        "eur": 16
      }
    },
    "access": {
      "startsAt": "2026-09-01T10:00:00.000Z",
      "validityDays": 365,
      "trialDays": 7,
      "maxBillingCycles": 12,
      "seatLimit": 100,
      "seatLabel": "Seats remaining",
      "allowMultipleQuantity": false
    }
  },
  "type": "Success",
  "message": "Mango created successfully",
  "statusMessage": "CREATED",
  "success": true
}

{
  "code": 400,
  "type": "Bad Request",
  "statusMessage": "BAD_REQUEST",
  "errorCode": "REMOTE_MEDIA_TOO_MANY_ITEMS",
  "message": "A request may contain at most 10 remote Mango media items.",
  "result": "A request may contain at most 10 remote Mango media items.",
  "success": false
}

{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "result": "Invalid token",
  "success": false
}
{
  "code": 403,
  "type": "Forbidden",
  "statusMessage": "FORBIDDEN",
  "errorCode": "WORKSHOP_MANGO_FORBIDDEN",
  "message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
  "result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
  "success": false
}
{
  "code": 404,
  "type": "Not Found",
  "statusMessage": "NOT_FOUND",
  "errorCode": "MANGO_CREATOR_NOT_FOUND",
  "message": "The creator associated with the API key does not exist.",
  "result": "The creator associated with the API key does not exist.",
  "success": false
}
{
  "code": 409,
  "type": "Conflict",
  "statusMessage": "CONFLICT",
  "errorCode": "IMPACTED_COUPONS_FOUND",
  "message": "One or more active creator coupons exceed the Mango price.",
  "result": "One or more active creator coupons exceed the Mango price.",
  "success": false
}
{
  "code": 429,
  "type": "Too Many Requests",
  "statusMessage": "TOO_MANY_REQUESTS",
  "message": "Request limit exceeded. try after 10 seconds",
  "result": "Request limit exceeded. try after 10 seconds",
  "success": false
}