If you're seeing this error:
INVALID_SCREEN_DATA: Invalid data model schema. Expected property 'example' to be of type (type in schema), but found (actual type).
It's a type mismatch between your declared schema and your example value. Most often, it’s a subtle mistake like quoting a number or boolean, turning them into strings.
Quick Fix
When using __example__, its value must match the data type defined in type. For example, if type is "number", then __example__ should be a number, not a string. Here’s the fix:
{
"type": "number",
"__example__": 123
}
The Problem
Here’s a broken example:
{
"type": "number",
"__example__": "123"
}
Even though "123" looks like a number, JSON treats it as a string. That breaks schema validation.
The Solution
Match the type exactly:
For type: "string" → "example"
For type: "number" → 123
For type: "boolean" → true or false
For type: "array" → [value1, value2] (matching items.type)
For type: "object" → { "key": "value" }
Correct example:
{
"type": "boolean",
"__example__": true
}
__example__ isn't just documentation, it’s used by tools to auto-generate mock data, preview layouts, and validate your screen schema. If its type is off, nothing renders properly.
For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.