Skip to content

Add files (.md, .txt, .html, .pdf, .docx) to a dataset, one item each; send a large folder in several requests

POST
/v1/datasets/{dataset_id}/files
curl --request POST \
--url https://api.supposing.app/v1/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=example \
--form redact=false

The files are read as POST /v1/datasets/upload reads them. Files past the plan’s documents per dataset are listed in skipped, so a folder sent in batches fills the dataset up to the limit and says what is left.

dataset_id
required
Dataset Id
string format: uuid
Idempotency-Key
Idempotency-Key

Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.

Any of:
string
<= 255 characters

Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.

Media typemultipart/form-data
Body_add_files
object
files
required
Files
Array<string>
redact
Redact

As for upload.

boolean

Successful Response

Media typeapplication/json
UploadResult
object
id
required
Id
string format: uuid
name
required
Name
string
created_at
required
Created At
string format: date-time
n_items
required
N Items
integer
n_runs
required
N Runs

Runs on this dataset, its one-off (ephemeral) runs included.

integer
source
required
Source

Where it was made: web, api, cli or mcp (the Supposing-Source header).

string
Allowed values: web api cli mcp
ephemeral
required
Ephemeral
boolean
mapping
required

For an imported spreadsheet: which columns the judge reads and which are kept only for people.

Any of:
DatasetMapping
object
id_field
required
Id Field

Your ID for each row (kept as source_id).

Any of:
string
title_field
required
Title Field

The title people see. Defaults to id_field.

Any of:
string
text_fields
required
Text Fields

What the judge reads, in order; with more than one, each is under a ‘## ’ heading.

Array<string>
<= 200 items
metadata_fields
required
Metadata Fields

Kept for people, never shown to the judge.

Array<string>
<= 200 items
filename
required
Filename
string
sheet
required
Sheet
Any of:
string
items
required
Items
Array<object>
ItemSummary
object
id
required
Id
string format: uuid
title
required
Title

The document’s first heading, else its file name without the extension.

string
filename
required
Filename
Any of:
string
source_id
required
Source Id

Where the item came from: the import’s ID column, else an ID in the file name, else the file name.

Any of:
string
n_words
required
N Words
integer
n_chars
required
N Chars
integer
added
required
Added

Items this request added (n_items is the dataset’s total).

integer
skipped
required
Skipped

Files that were not added, and why.

Array<object>
SkippedFile
object
filename
required
Filename
string
reason
required
Reason
string
warnings
required
Warnings

Files added with a caveat, as ‘name: what’, e.g. ‘notes.txt: not UTF-8; read as Windows-1252’.

Array<string>
duplicates
required
Duplicates
Array<object>
DuplicateGroup

Items whose texts are the same (identical) or nearly so (near). A warning: nothing is merged or dropped.

object
kind
required
Kind
string
Allowed values: identical near
similarity
required
Similarity

Share of five-word phrases in common, 0 to 1.

number
items
required
Items
Array<object>
DuplicateRef
object
item_id
required
Item Id
string format: uuid
title
required
Title
string
source_id
required
Source Id
Any of:
string

Example

{
"source": "web",
"duplicates": [
{
"kind": "identical"
}
]
}

Client error. Branch on code; show message and hint.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string
limit

For plan_limit_* codes: the limit, usage and upgrade.

Any of:
LimitInfo

Which plan limit a plan_limit_* error hit, and the way up.

object
name
required
Name

Datasets, items_per_dataset, chars_per_dataset or runs_per_month.

string
plan
required
Plan

The workspace’s plan: free (Pay as you go) or subscription.

string
limit
required
Limit
integer
used
required
Used

Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.

integer
upgrade_url
required
Upgrade Url

The web page that starts the Subscription; null while it can’t be bought here (then the hint says whom to write to).

Any of:
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
],
"limit": {
"name": "example",
"plan": "example",
"limit": 1,
"used": 1,
"upgrade_url": "example"
}
}

Server error.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string
limit

For plan_limit_* codes: the limit, usage and upgrade.

Any of:
LimitInfo

Which plan limit a plan_limit_* error hit, and the way up.

object
name
required
Name

Datasets, items_per_dataset, chars_per_dataset or runs_per_month.

string
plan
required
Plan

The workspace’s plan: free (Pay as you go) or subscription.

string
limit
required
Limit
integer
used
required
Used

Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.

integer
upgrade_url
required
Upgrade Url

The web page that starts the Subscription; null while it can’t be bought here (then the hint says whom to write to).

Any of:
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
],
"limit": {
"name": "example",
"plan": "example",
"limit": 1,
"used": 1,
"upgrade_url": "example"
}
}