# API - Error Code 422

### value\_error: Required value is not provided or is not in the correct format

> Check https://api.elevenlabs.io/docs#/ to see what parameters are required for the endpoint you are using. Ensure you are setting it properly.

### cors error

> A code 422 of type “cors” most commonly seems to occur when you do not use JSON.stringify() on the request body when using fetch() in JavaScript. It might also occur if you call one of the API from a frontend.

With any unsuccessful API response, be sure to check the response body as it will contain error detail in json format.

## Related pages

- [Administration](./administration-index.md)
- [API reference](./api-reference-index.md)
- [Changelog](./changelog-index.md)
- [ElevenAgents](./elevenagents-index.md)
- [ElevenAPI](./elevenapi-index.md)
- [ElevenCreative](./elevencreative-index.md)
- [ElevenLabs Documentation Docs](../index.md)
- [General Troubleshooting FAQ](./troubleshooting-index.md)
- [General Website FAQ](./website-index.md)
- [Help Center](./help-center-2-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
