> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Validate Kafka messages against a schema in Postman

You can link a Kafka topic or message to an AsyncAPI schema and Postman will automatically validate its payload's JSON shape against a linked schema.

> **Warning**
>
> Postman doesn't encode or decode Avro, protobuf (protocol buffers), or other binary wire formats, and it doesn't support Schema Registry yet. Only JSON payloads are validated.

## Link a topic or message to a schema

You can link a schema in two places:

* **Consume**: on the **Topics to stream** table, pick an AsyncAPI specification for a topic from the **Schema** column.
* **Produce**: the same schema picker is available on a message.

A spec can describe many channels, so pick one and browse its tree down to the specific topic and payload you want. If the topic you've selected isn't described anywhere in that spec, Postman shows a warning in place of the payload.

Once linked, Postman shows the topic's or message's payload schema in read-only mode. To change the schema itself, open the linked specification in Spec Hub to edit it.

> **Info**
>
> Postman stores only the specification ID and topic name for a link, not a schema name or `$ref` path, which can silently point to the wrong place if the spec is restructured. Each time you reload, Postman re-fetches the spec and re-derives the schema, so the link always reflects the spec's current state.

## How validation works

Once a topic or message is linked to a schema, Postman validates payloads against it as you produce and consume messages:

* **Producing**: the message body you're about to send is checked against the schema before you send it.
* **Consuming**: each incoming message on a linked topic gets a validation status as it arrives.

Validation is informational, not a gate. Sending and consuming always proceed. A stale or mismatched schema link never blocks a send or a consume. Its job is to surface problems, not stop you from testing against a real broker.

If a schema can't be resolved for any reason, the message shows as **unvalidated** instead of **passed**.

## Schema-based produce examples

When a message is linked to a schema, Postman can fill in the message value with an example payload that matches the structure and types defined in that schema, the same way it does for gRPC messages today. You can edit the generated example before sending.

> **Info**
>
> Schema-based examples and validation check the message's shape (field names and types). They don't check business-logic constraints the schema doesn't express.