Auto increment not working

when I am sending a post request on api/users with the key 'name ’ object is not created whereas when I send both id and name in the post request, then only an object is being created.
When I do not pass id it throws an error saying no default value of id assigned.

It is maybe id is mandatory parameter to add content in SQL table