---
title: "POST /api/v1/template-preparation/detection"
method: POST
path: "/api/v1/template-preparation/detection"
tags: ["Template Preparation Browser"]
---

# POST /api/v1/template-preparation/detection

`POST /api/v1/template-preparation/detection`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/template-preparation/detection`
- Auth: HTTP bearer

## Headers

- `authorization` string, required

## Response `201`

- FieldDetectionJobDto
  - `id` string, required: Job ID
  - `documentId` string: Document ID (if detecting for a document)
  - `templateId` string: Template ID (if detecting for a template)
  - `status` 'queued' | 'ocr_processing' | 'ai_processing' | 'completed' | 'failed', required: Current status of the field detection job
  - `ocrProcessingMs` number: OCR processing time in milliseconds
  - `aiProcessingMs` number: AI processing time in milliseconds
  - `proposedFieldCount` number: Number of proposed fields detected
  - `errorMessage` string: Error message if job failed
  - `createdAt` string, date-time, required: Job creation timestamp
  - `updatedAt` string, date-time, required: Job last update timestamp

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
