Replace Mango thank-you page
Creates or fully replaces the payment-success content for one owned Mango. This is a full replacement with no field defaults: every top-level field and every nested required field must be present. Use the documented null, false, empty-string, and empty-array forms to disable or clear individual parts. Use Get Mango thank-you page when you only need to inspect the current configuration.
The operation removes unsupported markup before storing and returning the content. It validates at most 10 image or video section URLs against the documented public-HTTPS, redirect, extension, availability, and content-type rules. A non-null redirect requires a public HTTPS host and a whole-second delay from 0 through 10.
A successful replacement changes only this Mango, even if it previously shared a configuration with other Mangoes. It does not send notifications or emails. Retrying the same body after a timeout is safe: repeated successful calls return the same public configuration.
Authorization
bearer In: header
Path Parameters
The 24-character hexadecimal ID of the owned Mango addressed by this operation. Obtain it from List Mangoes or the result._id returned by Create Mango.
Header Parameters
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 PUT "https://api-prod-new.tagmango.com/api/v1/external/mangos/6a8ec3908384d1f9507e7c2c/thank-you-page" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "title": "Payment received", "content": "<p>Thanks for joining.</p>", "button": { "title": "Open community", "description": "Continue to your member space.", "url": "https://academy.example.com/community", "hidden": false }, "sections": [ { "type": "image", "title": "Next steps", "content": "<p>Download the guide and join the community.</p>" } ], "redirect": null }'{
"code": 200,
"result": {
"title": "Payment received",
"content": "<p>Thanks for joining.</p>",
"button": {
"title": "Open community",
"description": "Continue to your member space.",
"url": "https://academy.example.com/community",
"hidden": false
},
"sections": [
{
"type": "image",
"title": "Next steps",
"content": "<p>Download the guide and join the community.</p>",
"assetUrl": "https://media.acmeacademy.com/workshop-schedule.webp"
}
],
"redirect": null
},
"type": "Success",
"message": "Mango thank-you page replaced successfully",
"statusMessage": "OK",
"success": true
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"errorCode": "THANK_YOU_PAGE_INVALID_SECTION",
"message": "A section title or content became blank after unsupported markup was removed. Change the indicated `sections[]` text so visible content remains after sanitization.",
"result": "A section title or content became blank after unsupported markup was removed. Change the indicated `sections[]` text so visible content remains after sanitization.",
"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_NOT_FOUND",
"message": "No active Mango owned by the authenticated creator matches `mangoId`. Choose an owned Mango ID returned by [List Mangoes](https://docs.tagmango.com/docs/api-reference/mango/listMangoesByCreator).",
"result": "No active Mango owned by the authenticated creator matches `mangoId`. Choose an owned Mango ID returned by [List Mangoes](https://docs.tagmango.com/docs/api-reference/mango/listMangoesByCreator).",
"success": false
}{
"code": 409,
"type": "Conflict",
"statusMessage": "CONFLICT",
"errorCode": "MANGO_THANK_YOU_PAGE_CONFLICT",
"message": "The Mango has multiple active thank-you-page configurations, or a concurrent first replacement could not converge after its bounded retry. Retry once only if another writer was updating the same Mango; otherwise stop until the account data is repaired.",
"result": "The Mango has multiple active thank-you-page configurations, or a concurrent first replacement could not converge after its bounded retry. Retry once only if another writer was updating the same Mango; otherwise stop until the account data is repaired.",
"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
}