Nango offers data validation at two levels: inside your Nango functions (when calling external APIs) and in your application code (when consuming function responses).Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Validate API responses in Nango functions
Use Zod to validate data you receive from and send to external APIs. The CLI will also surface type errors during dry runs when using the--validation option.
Validate Nango function responses in your app
TypeScript types (compile-time)
Usez.infer to derive TypeScript types from your Zod schemas and export them from your sync/action files:
JSON Schema (runtime, language-agnostic)
When you runnango compile or nango deploy, Nango generates a nango.json file in the .nango folder. Each sync/action entry includes a json_schema property with the JSON Schema for its models:
json_schema object for a given sync or action and use it with any JSON Schema validator in your language of choice (e.g., ajv in TypeScript, jsonschema in Python, jsonschema in Rust, santhosh-tekuri/jsonschema in Go).
Alternatively, Zod v4 supports JSON Schema conversion natively with z.toJSONSchema():
Related guides
- Action functions - validate action inputs and outputs.
- Sync functions - validate synced record models.
- Unified APIs - normalize provider data behind stable schemas.
- Testing - cover validation behavior in tests.