Agent SetupUpload a documentpost

Upload a document

Uploads a file as multipart form data. vault_id is optional: omit it to reuse the first accessible vault or create the default Agent Vault workspace for the API-key organization. For typed…

curl -X POST "https://public-api.textmine.com/v3/documents?name=John%20Doe&team_id=123&vault_id=123&document_type_id=123&extract=example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN (TextMine tm_ API key)" \
  --form file=example_string
[
  {
    "id": 123,
    "name": "John Doe",
    "status": "example_string",
    "team_id": 123,
    "vault_id": 123,
    "document_type_id": 123,
    "mime_type": "example_string",
    "size_bytes": 42,
    "page_count": 25,
    "uploaded_at": "2024-12-25T10:00:00Z",
    "processed_at": "2024-12-25T10:00:00Z"
  }
]
POST
/v3/documents
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (TextMine tm_ API key)
Bearer Tokenstring
Required

Bearer token (TextMine tm_ API key) - just enter the token, "Bearer" prefix will be added automatically

query
team_idinteger
Format: int64
query
vault_idinteger

Optional. Omit to reuse the first accessible vault or create the default Agent Vault workspace for the API-key organization.

Format: int64
Content-Typestring
Required

The media type of the request body

Options: multipart/form-data
filefile
Required
Format: binary
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (TextMine tm_ API key). Authentication token required.

Query Parameters

vault_idinteger

Optional. Omit to reuse the first accessible vault or create the default Agent Vault workspace for the API-key organization.

Body

multipart/form-data

Responses

Uploads a file as multipart form data. vault_id is optional: omit it to reuse the first accessible vault or create the default Agent Vault workspace for the API-key organization. For typed processing, pass document_type_id. ZIP files may expand into multiple created documents.