DocumentsImport a provider file into Vaultpost

Import a provider file into Vault

Imports a file from a connected outbound provider into a TextMine Vault. The server uses the user stored OAuth token, fetches the file, and feeds it into the same magic upload pipeline as direct…

curl -X POST "https://api.textmine.com/v3/documents/from-provider" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "provider_id": "google-drive",
  "external_file_id": "drive-file-abc123",
  "name": "Acme supplier agreement.pdf",
  "team_id": 321,
  "vault_id": 12345,
  "document_type_id": 777,
  "extract": "Extract parties, term, renewal, termination, and governing law."
}'
[
  {
    "id": 67890,
    "name": "Acme supplier agreement.pdf",
    "status": "processed",
    "team_id": 321,
    "vault_id": 12345,
    "document_type_id": 777,
    "mime_type": "application/pdf",
    "size_bytes": 245760,
    "page_count": 12,
    "uploaded_at": "2024-12-25T10:00:00Z",
    "processed_at": "2024-12-25T10:00:00Z"
  }
]
POST
/v3/documents/from-provider
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
provider_idstring
Required

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

Options: notion, google-drive, sharepoint
external_file_idstring
Required

Provider-native file ID returned by the browse endpoints.

team_idinteger
Format: int64
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

application/json
provider_idstring
Required

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

Allowed values:notiongoogle-drivesharepoint
external_file_idstring
Required

Provider-native file ID returned by the browse endpoints.

Example:
drive-file-abc123
namestring
Example:
Acme supplier agreement.pdf
team_idinteger
Example:
321
extractstring
Example:
Extract parties, term, renewal, termination, and governing law.

Responses

Imports a file from a connected outbound provider into a TextMine Vault. The server uses the user stored OAuth token, fetches the file, and feeds it into the same magic upload pipeline as direct uploads.