DocumentsCreate a provider document or upload files into Vaultpost

Create a provider document or upload files into Vault

This path supports two content types: - application/json creates a document inside a connected outbound provider such as Notion. - multipart/form-data uploads a file into TextMine Vault and…

curl -X POST "https://api.textmine.com/v3/documents" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "provider": "notion",
  "title": "Contract review note",
  "blocks": [
    "Review the limitation of liability clause."
  ],
  "properties": {
    "source": "api"
  }
}'
{
  "id": "notion-page-abc123",
  "url": "https://www.notion.so/example/notion-page-abc123",
  "providerId": "notion"
}
POST
/v3/documents
POST
Base URLstring

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

Bearer Token (`tm_<key>`)
Bearer Tokenstring
Required

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
Content-Typestring
Required

The media type of the request body

Options: application/json, multipart/form-data
providerstring
Required

Canonical provider ID used in paths, JSON bodies, and MCP tool parameters.

Options: notion, google-drive, sharepoint
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tm_<key>). Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Body

providerstring
Required

Canonical provider ID used in paths, JSON bodies, and MCP tool parameters.

Allowed values:notiongoogle-drivesharepoint
titlestring
Required
Example:
Contract review note
blocksarray
Example:
["Review the limitation of liability clause.","Owner: Legal operations"]
propertiesobject
Example:
{"vault_id":"12345","source":"api"}

Responses

This path supports two content types:

  • application/json creates a document inside a connected outbound provider such as Notion.
  • multipart/form-data uploads a file into TextMine Vault and starts the magic upload pipeline. ZIP files expand into multiple documents.

Agents should choose the content type based on the task. To import a file from Google Drive or SharePoint into Vault without downloading it locally, use importDocumentFromProvider instead.