https://developers.pipedrive.com/docs/api/v1/#!/Files/post_files Doesn't show request example and I can't send POST request via python.
My error is: "No files provided"
Maybe someone has an example for this request?
My code:
import requests
with open('qwerty.csv', 'rb') as f:
r = requests.post('https://api.pipedrive.com/v1/files',
params={'api_token': 'MY_TOKEN'}, files={'file': f})
Well, I was dumb.
All you need is check request in chrome develop tools and play with it for some time.
Update
Recently used this endpoint (Feb 2021). Turns out the endpoint doesn't accept the 'file_type' parameter anymore.