Issue symptoms
I make an API request and get a 200 response, but the change I request is ignored. Why is that?
Resolution steps
The REST API is permissive. It ignores attributes that do not exist in the data model and then processes the rest of the request.
For example, you might send this payload to update a ticket with an attribute that is not part of the ticket object, such as this payload:
{
"ticket": {
"non_existent_field": "42"
}
}The
non_existent_field attribute is ignored, and nothing else in the payload causes an error.
Note: This header was previously available, but it is not returned at the moment. The cause remains under review.
To check for ignored fields, look for an
X-Zendesk-Api-Warn header. When present, the response headers can include:X-Zendesk-Api-Warn: Removed restricted keys ["ticket.non_existent_field"] from parameters according to allowlist
REST API best practice
Compare the values you send in the payload to the response object when possible. This helps you catch the issue above and shows if your business rules change the values that you try to set.
For more information about API usage management, see the article: Managing API usage in your Zendesk account.