POST/files

Upload a File

Uploads a file and creates a File resource. Send the request as multipart/form-data with file and purpose; use description to add optional identifying text.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields

Multipart form data containing the file and its purpose, with an optional description.

descriptionstringoptional
The description you choose to give the File.
filestringrequired
The file contents. This should follow the specifications of [RFC 7578](https://datatracker.ietf.org/doc/html/rfc7578) which defines file transfers for the multipart/form-data protocol.
purposestringrequired
What the File will be used for in Increase's systems.
Allowed:card_dispute_attachmentcheck_image_frontcheck_image_backmailed_check_imagecheck_attachmentcheck_voucher_imagecheck_signatureform_ss_4identity_documentloan_application_supplemental_documentothertrust_formation_documentDefault:other

3 status codes
200Returns the created File, including its identifier, creation time, purpose, direction, MIME type, and filename.
created_atstringrequired
The time the File was created.
descriptionstringrequired
A description of the File.
directionstringrequired
Whether the File was generated by Increase or by you and sent to Increase.
Allowed:to_increasefrom_increase
filenamestringrequired
The filename that was provided upon upload or generated by Increase.
idstringrequired
The File's identifier.
idempotency_keystringrequired
The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).
mime_typestringrequired
The MIME type of the file.
purposestringrequired
What the File will be used for. We may add additional possible values for this enum over time; your application should be able to handle such additions gracefully.
Allowed:card_dispute_attachmentcheck_image_frontcheck_image_backprocessed_check_image_frontprocessed_check_image_backmailed_check_imagecheck_attachmentcheck_voucher_imagecheck_signatureinbound_mail_itemform_1099_intform_1099_misc
typestringrequired
A constant representing the object's type. For this resource it will always be `file`.
Allowed:file
4XXReturned when the request has a client-side error.
5XXReturned when the server encounters an error processing the request.

Error handling

file and purpose are required. purpose must be a supported value, and description, if provided, must contain 1 to 200 characters; send the file as multipart/form-data.