Create an intake file upload

Allowed Scopes: experimental:intake:write

Creates a presigned upload target for an intake file. This is step 1 of 3 in creating an intake from a document:

  1. Create an upload with this endpoint to get a presigned URL and an uploadId.
  2. Send the file to that URL, then poll Get an intake file upload status until it returns a documentId.
  3. Pass that documentId to Create an intake.

contentLength must be the exact byte size of the file you are about to send. The presigned policy pins that size, so an approximate value makes the upload in step 2 fail rather than this call.

To send the file, make a multipart/form-data request to upload.url using upload.method. Include every entry of upload.fields as a form field, then add the file itself as a field named file, last. The URL points to our storage provider and not to the Spendesk API, so do not send your access token with it. Upload before upload.expiresAt; once the URL has expired, call this endpoint again for a fresh one.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The company ID.

Body Params
string
required
length ≥ 1

Media type of the file. Allowed types: application/pdf, image/png, image/jpeg, application/xml, text/xml.

integer
required
1 to 10485760

Exact size of the file in bytes. The presigned upload rejects a file whose size differs from this value. Maximum: 10485760 (10 MB).

Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json