API Quickstart
Use the xTrakt API when another system needs to submit documents and consume structured results.
When To Use This
Use this guide when building an integration, validating credentials, or testing extraction and classification endpoints.
Before You Start
- Confirm API access is enabled for your tenant.
- Generate or obtain an API key.
- Confirm which endpoint and template or classifier your integration should call.
- Prepare a sample document identifier or upload flow according to your integration.
Workflow
- Generate an API key from the product UI.
- Store the key securely in your integration environment.
- Send a request with the credential in the
Authorizationheader. - Parse the response body as JSON.
- Handle
hasErrors,data, and status-code-specific responses. - Log request identifiers or support details when a request fails.
caution
Some xTrakt backend responses are returned with Content-Type: text/plain while the body contains JSON. API clients should parse the response body as JSON even when the content type is not application/json.
Example
curl -X POST "https://api.example.com/document/get-extraction" \
-H "Authorization: Bearer <access-token-or-api-key>" \
-H "Content-Type: application/json" \
-d '{
"documentId": "example-document-id",
"templateId": "example-template-id"
}'