Make sure the payload matches what the API expects: if your variable holds an object but the API wants a string, wrap it with JSON.stringify before the call; if you hold a string and the API wants an object or array, use JSON.parse first. Fixing the string/object mismatch is what makes the POST work.

Context: Stack Overflow question: building a PDF-generation call to the Carbone API from Retool, the JSON data variable does not pass through the POST body correctly.