# Fixing INVALID_SCREEN_DATA in WhatsApp Flows: Expected the property ‘type’ to be of type string. Here's the Fix
Author: Prashant Jangid
Author URL: https://www.heltar.com/blogs/author/prashant-jangid
Published: 2025-05-16
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-in-whatsapp-flows-expected-the-property-type-to-be-of-type-string-heres-the-fix-cmaqt8c0f0097kwl4ym5vttrc

Seeing this error?

**INVALID\_SCREEN\_DATA**

**Expected the property ‘type’ to be of type string.**

You’ve added a type field — but gave it the wrong data type. It must always be a string like "string", "number", "boolean", etc.

## The Fix (TL;DR):

Set type as a string, not a number or any other type.

### Correct:

```
"data": {
  "name": {
    "type": "number"
  }
}
```

### Incorrect:

```
"data": {
  "name": {
    "type": 123
  }
}
```

## Why This Happens

The type property tells WhatsApp Flows what kind of value to expect for a field — and it must always be a string. If you use a number, object, or boolean instead, the schema is considered invalid.

In the original example:

```
"type": 123
```

That’s a number, and the validator throws an error immediately.

## Common Valid type Strings

- "string" — for text values

- "number" — for numeric input

- "boolean" — for true/false flags

- "object" — for structured data

- "array" — for lists


## Best Practices

- Double-check your types. If it’s not quoted, it’s not a string.

- Use a JSON linter or schema validator to catch these issues early.

- Stick to standard types and avoid typos like "str" or "text".


This is a quick fix, but easy to overlook when building fast. Just remember: in JSON schemas, "type" always takes a string. No exceptions. 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.
---

