Skip to content

Instantly share code, notes, and snippets.

@ontask-gist
Last active December 1, 2023 13:28
upload-document-python
import requests
import json
url = 'https://docubee.app/api/v2/documents'
headers = {
'Authorization': 'WORKSPACE-ACCESS-TOKEN'
'Content-Type': 'application/pdf'
}
data = open('path/to/file.pdf', 'rb').read()
response = requests.post(url=url, headers=headers, data=data)
print(response.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment