# 40032: Invalid message extras field Identifier: `invalid_message_extras_field` A publish was rejected because a message included an extras field that is not permitted, or one whose value was the wrong type. Only recognized extras keys with values of the expected shape are accepted. ## What you should do Put only recognized Ably keys in a message's [`extras`](https://ably.com/docs/messages.md#properties) field, with values of the expected shape. To attach your own metadata, use `extras.headers`, which must be a flat map of string keys to string, number, boolean, or null values. Move any custom fields there and republish. ## Why it happens A message's `extras` contained a key Ably doesn't permit, or `extras.headers` had the wrong shape. `extras` is reserved for specific Ably features, so arbitrary top-level keys are rejected, as are `headers` that aren't a flat, string-keyed map of simple values. ## What you'll see The error is reported with code 40032 and HTTP status 400. The messages include `Message has impermissible extras fields: ` and `extras.headers if present must be a map`.