Re: Cannot Get Patch Request To Work

627 2
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast
article_url = ""
data = {"fields" : {"contacted" : "hello world"}, "typecast":True}
patch_article_data = requests.patch(article_url, data=data)

I don’t understand why the above doesn’t work doing a patch request. I’ve tried many variations, including without typecast. I get the following response.

{u'error': {u'message': u'Invalid request: parameter validation failed. Check your request data.', u'type': u'INVALID_REQUEST_UNKNOWN'}}

8 Replies 8

I’m pretty sure a record ID is required for a PATCH.


5 - Automation Enthusiast
5 - Automation Enthusiast

In the example, row_id is the record_id. Should it be a param instead?

Without a complete review of the underlying code I can only say that I think a PATCH payload (the data) must be an array of records to be updated.

Hi @Suraj_Kapoor - I’m assuming you are using the Python requests library here. This is some code that I implemented for a patch request:

api_url = '' + id

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR API KEY'

data = {
  "fields": {
    "your_field_name": "value"

response = requests.patch(api_url, headers=headers, json=data)

Looking at this post:

it recommends using the API key in the headers, rather than as a URL param. Try this, hopefully will work out for you.


As per the API docs for your base, the record id should be in the patch request URL:

curl -v -X PATCH

5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you! That did the trick. Appreciate your help

I am also facing the same issue that getting this error for patch request. I have added the API key in the header and the view in the query parameter but still getting the same error

Did you pass the ID of the record you wanted to update? e.g.:

Note the record ID on the end, this is the record you want to update