SearchSearch documents with a JSON bodypost

Search documents with a JSON body

Searches documents with the same filters as GET. Prefer POST when filters are complex or arrays are large.

curl -X POST "https://api.textmine.com/v3/documents/search" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "q": "termination for convenience",
  "vault_ids": [
    12345
  ],
  "status": "processed",
  "limit": 25
}'
{
  "items": [
    {
      "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"
    }
  ],
  "nextCursor": "example_string",
  "total": 42
}
POST
/v3/documents/search
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
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
qstring
Example:
termination for convenience
statusstring
Example:
processed
date_fromstring
Example:
2026-01-01T00:00:00Z
date_tostring
Example:
2026-06-30T23:59:59Z
limitinteger
Example:
25

Responses

itemsarray
nextCursorstring

Cursor to pass to the next request. Null means there are no more results.

totalinteger

Total rows when the endpoint can compute it cheaply.