According to this documentation, error code 406 signifies "This service doesn’t support the format requested in the Accept header."
The "Accept" header field can be used by user agents to specify response media types that are acceptable.
Please ensure that you are using right content-type.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote. If you have further questions about this answer, please click "Comment".