Skip to navigation

Create a file

Create a file of a supported type. Currently, we support these file extensions: .csv; .html; .jmp, .jrn, .jrp (JMP); .jpeg, .jpg (JPEG); .png; .pdf; .zip; and .txt.

A successful file upload requires 3 calls in serial:

  1. Create a file, this endpoint, which returns an S3 PUT URL for the 2nd call and a file ID for the 3rd call
  2. Upload the file contents to S3. Add x-amz-server-side-encryption: AES256 to the request headers, because we use server-side encryption. Here is a curl example:
    curl -H "x-amz-server-side-encryption: AES256" -X PUT -T <LOCAL_FILE> -L <S3_PUT_URL>
  3. Update the file, which marks the upload as SUCCEEDED

Note: URL is valid for 1 hour after being returned from this endpoint. It should not be stored persistently for later use.

Files up to 30MB are supported.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
customFieldsmap from strings to objectsOptional
Custom field values to set on the file
filenamestringOptional
Filename for the file
folderIdstringOptional
ID of the folder that contains the file
namestringOptional
Display name for the file

Response headers

Content-LocationstringOptional
The S3 URL to which the file contents can be uploaded

Response

OK
errorMessagestring or nullOptional
uploadStatusenumOptional
Allowed values:
archiveRecordobject or nullOptional
ArchiveRecord Resource if the file is archived. This is null if the file is not archived.
createdAtdatetimeOptionalRead-only
Date and time the file was created
creatorobjectOptional
UserSummary of the user who created the file
customFieldsmap from strings to objectsOptional
Custom field values of the file
displayIdstringOptionalRead-only

User-friendly ID of the file

filenamestringOptional
folderIdstringOptional
ID of the folder that contains the file
idstringOptional
modifiedAtdatetimeOptionalRead-only
Date and time the file was last modified
namestringOptional

Errors

400
Bad Request Error
403
Forbidden Error