92007: The Content Variables Parameter is invalid
MESSAGING
ERROR
This error occurs when ContentVariables is not sent in a valid format. Send ContentVariables as a JSON string of key-value pairs for the variables in your content template. When you include ContentVariables, also include ContentSid.
- You sent
ContentVariablesas an object, array, or another value instead of a JSON string. - The JSON string is malformed because it contains invalid quotes, commas, braces, or escaping.
- One or more
ContentVariablesvalues are null or empty strings. - For approved WhatsApp templates, a variable value contains a newline.
- Serialize the variable payload to a JSON string before sending the request. If you use a helper library, pass
contentVariables: JSON.stringify({...}). - Validate the JSON before sending the request and confirm it contains valid key-value pairs for your template variables.
- Include
ContentSidwithContentVariables. - Replace null or empty values with valid substitutions, or omit a value so the template can use its default placeholder value.
- If you are sending an approved WhatsApp template, remove newline characters from variable values and verify the template follows WhatsApp variable rules.