Skip to main content
POST
/
api
/
import
Import Documents
curl --request POST \
  --url https://api.example.com/api/import \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "imported": 123,
  "skipped": 123,
  "failed": 123,
  "stats": {
    "total_parsed": 123,
    "documents": [
      {}
    ]
  },
  "failures": []
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

source
enum<string>
required

Source type

Available options:
chatgpt,
claude,
craft
skip_duplicates
boolean
default:false

Skip documents with matching source_id

Body

multipart/form-data
file
file
required

Export file to import

Response

Successful Response

Result of an import operation.

imported
integer
required
skipped
integer
required
failed
integer
required
stats
ImportStats · object
required

Statistics about the import operation.

failures
ImportFailure · object[]