List available document types
GET /documents/types
Returns all document types you can process, with their endpoints and status.
Authentication
Your DocsOCR API key, sent as Authorization: Bearer <key>. Keys start with dso_live_v1_ or dso_test_v1_; both call the engines and use credits. Manage keys
Responses
200 OK
Available document types
Response fields
typesList of available document types
types[].idUnique identifier for the document type
types[].nameHuman-readable name of the document type
types[].descriptionBrief description of the document type
types[].iconIcon emoji for the document type
types[].enabledWhether this document type is currently enabled for processing
types[].endpointAPI endpoint for processing this document type
401 Unauthorized
Invalid or missing API key.
Response fields
errorError category (always
Unauthorized)messageWhat went wrong with the key. Manage API keys
timestampWhen the request was refused, in UTC
{
"error": "Unauthorized",
"message": "Invalid or expired API key",
"timestamp": "2026-10-02T12:00:00.000Z"
}{
"error": "Unauthorized",
"message": "API key is required. Provide Authorization: Bearer <your-api-key>",
"timestamp": "2026-10-02T12:00:00.000Z"
}#!/usr/bin/env bash
# The document types the API reads, and the endpoint of each.
# Needs DOCSOCR_API_KEY in the environment; create a key in the panel.
set -euo pipefail
curl -sS --max-time 30 https://api.docsocr.com/api/v1/documents/types \
-H "Authorization: Bearer $DOCSOCR_API_KEY""""The document types the API reads, and the endpoint of each.
Needs the requests package and DOCSOCR_API_KEY in the environment.
"""
import os
import requests
response = requests.get(
"https://api.docsocr.com/api/v1/documents/types",
headers={"Authorization": f"Bearer {os.environ['DOCSOCR_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
for document_type in response.json()["types"]:
print(f"{document_type['id']}: POST {document_type['endpoint']}")// The document types the API reads, and the endpoint of each.
// Needs Node.js 18+ and DOCSOCR_API_KEY in the environment.
const response = await fetch('https://api.docsocr.com/api/v1/documents/types', {
headers: { Authorization: `Bearer ${process.env.DOCSOCR_API_KEY}` },
signal: AbortSignal.timeout(30_000),
})
if (!response.ok) {
console.error(response.status, await response.text())
process.exit(1)
}
for (const type of (await response.json()).types) {
console.log(`${type.id}: POST ${type.endpoint}`)
}<?php
// The document types the API reads, and the endpoint of each.
// Needs the curl extension and DOCSOCR_API_KEY in the environment.
$request = curl_init('https://api.docsocr.com/api/v1/documents/types');
curl_setopt_array($request, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DOCSOCR_API_KEY')],
]);
$body = curl_exec($request);
$status = curl_getinfo($request, CURLINFO_RESPONSE_CODE);
if ($body === false || $status !== 200) {
fwrite(STDERR, "$status " . ($body === false ? curl_error($request) : $body) . PHP_EOL);
exit(1);
}
foreach (json_decode($body, true)['types'] as $type) {
echo "{$type['id']}: POST {$type['endpoint']}", PHP_EOL;
}// The document types the API reads, and the endpoint of each.
// Needs Java 17+ and DOCSOCR_API_KEY in the environment. Run: java DocumentTypes.java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
public class DocumentTypes {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.docsocr.com/api/v1/documents/types"))
.timeout(Duration.ofSeconds(30))
.header("Authorization", "Bearer " + System.getenv("DOCSOCR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
// The answer is JSON, e.g. {"types": [{"id": "birth-certificate", ...}]}; read it with your JSON library
System.out.println(response.body());
if (response.statusCode() != 200) {
System.exit(1);
}
}
}// The document types the API reads, and the endpoint of each.
// Needs .NET 8+ and DOCSOCR_API_KEY in the environment. Run: dotnet run DocumentTypes.cs (.NET 10)
using System.Net.Http.Headers;
using System.Text.Json;
using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(30) };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("DOCSOCR_API_KEY"));
using var response = await http.GetAsync("https://api.docsocr.com/api/v1/documents/types");
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
Console.Error.WriteLine($"{(int)response.StatusCode} {body}");
return 1;
}
using var answer = JsonDocument.Parse(body);
foreach (var type in answer.RootElement.GetProperty("types").EnumerateArray())
{
Console.WriteLine($"{type.GetProperty("id").GetString()}: POST {type.GetProperty("endpoint").GetString()}");
}
return 0;Try it
Sends this request to the production API, with your key.
The key stays in this browser tab only, and goes only to the API. Create a key in the panel
This call costs no credits.
Paste your API key to send.