Skip to main content
POST
/
v1
/
documents
/
upload
Upload Document To Editor
curl --request POST \
  --url https://api.example.com/v1/documents/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'session_id=<string>' \
  --form open_mode=replace
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null

Query Parameters

index
string | null

Set to 'true' for immediate AI indexing (API clients). Default: conversion only.

Body

multipart/form-data
file
file
required
session_id
string | null
open_mode
string | null
default:replace

How the uploaded file enters the session: 'replace' (default) replaces the focused document; 'new_focused' opens it as a new document and focuses it; 'background' opens it without changing focus.

Response

Successful Response