List document types
Lists document types reachable from a Vault. Org-wide listing is not wired yet, so pass vault_id.
curl -X GET "https://api.textmine.com/v3/document-types?vault_id=123&team_id=123&cursor=example_string&limit=50" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)"
import requests
import json
url = "https://api.textmine.com/v3/document-types?vault_id=123&team_id=123&cursor=example_string&limit=50"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (`tm_<key>`)"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.textmine.com/v3/document-types?vault_id=123&team_id=123&cursor=example_string&limit=50", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (`tm_<key>`)"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.textmine.com/v3/document-types?vault_id=123&team_id=123&cursor=example_string&limit=50", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (`tm_<key>`)")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.textmine.com/v3/document-types?vault_id=123&team_id=123&cursor=example_string&limit=50')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (`tm_<key>`)'
response = http.request(request)
puts response.body
{
"items": [
{
"id": 777,
"name": "Supplier agreement",
"code": "supplier_agreement",
"description": "Commercial supplier or procurement agreement.",
"vaultId": 12345,
"tableExtractionEnabled": true,
"embeddedImageClassificationEnabled": false,
"alternativeNames": [
"John Doe"
]
}
],
"nextCursor": "example_string",
"total": 42
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Error",
"message": "This v3 route exists in code but is not wired yet. Agents should not rely on it for production workflows.",
"code": 501
}
/v3/document-types
Target server for requests. Edit to use your own host.
Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.Vault to list document types for.
Reserved for future team-scoped listing.
Opaque cursor from the previous page. V3 currently uses numeric offsets as cursors.
Maximum number of items to return. Values above the service limit are clamped.
Request Preview
Response
Response will appear here after sending the request
Authentication
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.
Query Parameters
Vault to list document types for.
Reserved for future team-scoped listing.
Opaque cursor from the previous page. V3 currently uses numeric offsets as cursors.
Maximum number of items to return. Values above the service limit are clamped.
Responses
Cursor to pass to the next request. Null means there are no more results.
Total rows when the endpoint can compute it cheaply.