Upload Document

Upload the File

Send a PUT request directly to the url returned in the Create Document Response

PUT <url returned by Create Document>
PUT https://example.com

This URL is generated for each document and is not a TabaPay API endpoint.

ItemValueDescription
MethodPUTUpload the file to the url returned by Create.
Authorization header(omit)Do not send the Bearer token. The URL is already authorized.
Content-Type headermatches extension
  • application/pdf
  • image/png
  • image/jpeg
Request BodyRaw file bytesSend the binary file contents.
Do not send JSON or Base64-encoded content.

Example

Request

curl --request PUT \
  --url "{url returned by Create Document}" \
  --header "Content-Type: application/pdf" \
  --data "{raw file bytes}"

Response

  • HTTP 2xx indicates the file was stored. There is no JSON body.
  • The URL is time-limited; upload before it expires. If it expires, create the document again to obtain a new URL.

URL Expiration

Both the Upload URL and the Download Document URL are time-limited (capped at 7 days). The upload URL is returned by Create Document. If the URL expires before upload, call Create Document again.