File Upload Guide

Overview

This document provides guidelines for uploading files using the endpoint https://api.justt.ai/v1/files. This API allows you to upload files to the Justt platform securely.

General Flow

This is a flow of file uploading to just

Endpoint

  • Endpoint: https://api.justt.ai/v1/files
  • Method: POST

Request Parameters

The file upload request should include the following parameters:

Body

The file should be sent as part of the request body using the multipart/form-data encoding.

ParameterDescription
fileThe file to be uploaded
purposePurpose of the file upload
metadataKey value pairs of metadata you want to add to the file

Example Request

POST https://api.justt.ai/v1/files
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: multipart/form-data

file: [binary file data]
purpose: document
expiry: 2023-12-31

Response

The response will include details about the uploaded file, including a unique file ID and a download URL.

Example Response

{
  "fileId": "1234567890",
 }

File Upload Guidelines

Purpose

Each file you upload needs to set its purpose, purpose set the file max size, retention policies, and usage

PurposeDescriptionSupported Mime TypesMax SizeRetention Period
case_fileA file related to a specific chargebackJPEG/PNG7MB6 Months

Attaching file to chargeback (case_file purpose)

In case, you need to attach a file to a case (for instance, a customer signature) you will need to attach the uploaded file to the chargeback