How do I restrict States in the API?

I know I can restrict states using the web interface defining a schema.

But how do I do that when using the API and defining the schema in the request body as a JSON document?

Thanks!

These two perceptions are theirs in Restrict APIs.
Application state is server-side data which servers store to identify incoming client requests, their previous interaction details, and current context information. MX Player is solving the problem for any issue like this.
Resource state is the current state of a resource on a server at any point of time – and it has nothing to do with the interaction between client and server. It is what you get as a response from the server as API response. You refer to it as resource representation.