# Fixing "INVALID_SCREEN_DATA: 'example' type does not match schema definition" on WhatsApp API
Author: Prashant Jangid
Author URL: https://www.heltar.com/blogs/author/prashant-jangid
Published: 2025-05-20
Category: Troubleshoot
Category URL: https://www.heltar.com/blogs/category/troubleshoot
Tags: WhatsApp Flows Error
Tag URLs: WhatsApp Flows Error (https://www.heltar.com/blogs/tag/whatsapp-flows-error)
URL: https://www.heltar.com/blogs/fixing-invalidscreendata-example-type-does-not-match-schema-definition-on-whatsapp-api-cmawlzyto000eqcb4095ym35m

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](https://www.heltar.com/blogs).


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

