Documentation Index

Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt

Use this file to discover all available pages before exploring further.

HTML Usage in Call an API JSON

Prev Next

When you include HTML inside a JSON request body in a Call an API element, keep in mind that JSON already uses double quotes (") to wrap every value. Any double quote inside your HTML (e.g., in an attribute like rel="noopener noreferrer" or href="https://example.com") closes the JSON string early and triggers an "invalid JSON" error.

To keep the payload valid, escape each double quote in your HTML by placing a backslash before it (\").

This version is invalid (the quotes inside the HTML break the JSON):

"message": "<a href="https://example.com" rel="noopener noreferrer">Shop now</a>"

This version is correct (every HTML quote is escaped with \"):

"message": "<a href=\"https://example.com\" rel=\"noopener noreferrer\">Shop now</a>"

If you prefer not to escape every quote, you can use single quotes for the HTML attributes instead (e.g., <a href='https://example.com'>) since single quotes don't conflict with JSON. After editing, always run Test API to confirm the body is valid before saving; the element validates the HTML, so any unescaped quote is caught here rather than at send time.