1
article_url = "https://api.airtable.com/v0/appxxxxxxxxxxx/articles/row_id?api_key=APIKEY"
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'}}
Suraj Kapoor
  • 1,615
  • 4
  • 22
  • 34

1 Answers1

2

I think that the problem is linked with the way you are sending the payload, instead of sending it like a string I would recommend you try sending it as a JSON string by replacing:

patch_article_data = requests.patch(article_url, data=data)

with

patch_article_data = requests.patch(article_url, json=data)
Nazim Kerimbekov
  • 4,712
  • 8
  • 34
  • 58