Uploads a file to a specific upload URL.


POST $upload_url

where $upload_url is the URL displayed in the links.upload field in the response body of a successful Authorize request. See Authorize for details.

Request Header

Header Field Value

Required. File name of the uploaded file.

Request Body

Binary. Attached source file.

Example request

curl -X POST --data-binary @example.doc -H "filename: example.doc" $upload_url

import requests, json
filename = "example.doc"
content = open(your_file,"rb").read()
r = requests.post(auth_response["links"]["upload"], content, headers={"filename": your_file})
upload_response = json.loads(r.text)


The response is at minimum an empty JSON array.

Response Body

Name Type Description
error string The default error message is invalid_request when the link is expired or the request is broken.

Response Examples

HTTP 202, OK

HTTP 400, Bad Request
    "error": "invalid_request"

Response Codes

Code Value Description Response Body Value
202 Accepted Upload file accepted. {}
400 Bad Request The file was not sent with the request. invalid_request

Any thoughts? Did we miss something? Drop us a note!