Skip to main content
POST
/
projects
/
{project_name}
/
tables
/
{table_id}
/
files
Upload a new file into a table
curl --request POST \
  --url https://api.cloudsquid.io/api/projects/{project_name}/tables/{table_id}/files \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "filename": "<string>",
  "file": "<string>"
}
'
{
  "row_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cloudsquid.io/llms.txt

Use this file to discover all available pages before exploring further.

This is step 1 of 3 in the async run pattern. After uploading, use the returned row_id to start a run, then poll for results.For a single blocking call that handles everything, see synchronous extraction.

What this does

Creates a row in the extraction table linked to the uploaded file, but does not start processing. The returned row_id is required for all subsequent operations on this file.

Example

cURL
curl -X POST \
  "https://api.cloudsquid.io/api/projects/my-project/tables/TABLE_ID/files" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": "'$(base64 -i invoice.pdf)'",
    "filename": "invoice.pdf",
    "mimetype": "application/pdf",
    "file_type": "binary"
  }'
Response:
{ "row_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
Pass this row_id to POST /run to start extraction.

Authorizations

X-API-Key
string
header
required

Path Parameters

project_name
string
required

The name of the project

table_id
string<uuid>
required

The ID of the table

Body

application/json
mimetype
enum<string>
required

the mimetype of the document being uploaded

Available options:
application/pdf,
application/json,
image/jpg,
image/jpeg,
image/png,
text/csv,
text/plain,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
application/vnd.ms-excel,
video/mp4,
audio/mp3,
audio/wav,
audio/ogg,
multipart/related,
message/rfc822
filename
string
required

the name of the file being uploaded

file_type
enum<string>
required

Indicates whether the file is a binary upload or a signed link to the document.

Available options:
uri,
binary,
multipart
file
required

A signed URL to the file.

Response

Created extraction job for the uploaded file

row_id
string<uuid>
required

the extraction row created for the uploaded file