Skip to main content
POST
/
api
/
v1
/
files
Upload File
curl --request POST \
  --url https://api.example.com/api/v1/files \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=<string>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "filename": "<string>",
  "content_type": "<string>",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "file_size_bytes": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "file_type": "user_upload",
  "parent_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

context_id
string<uuid> | null

Body

multipart/form-data
file
string
required

Response

Successful Response

id
string<uuid>
required
filename
string
required
content_type
string
required
Maximum string length: 256
created_by
string<uuid>
required
file_size_bytes
integer | null
created_at
string<date-time>
file_type
enum<string>
default:user_upload
Available options:
user_upload,
extracted_text
parent_file_id
string<uuid> | null
context_id
string<uuid> | null