Skip to main content
POST
/
templates
Create template
curl --request POST \
  --url https://api.anycheck.ai/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Company Registration Verification",
  "description": "Template for extracting company registration data",
  "schema": {
    "company_name": {
      "type": "string",
      "required": true
    },
    "registration_number": {
      "type": "string",
      "required": true
    },
    "address": {
      "type": "string",
      "required": false
    }
  },
  "custom_id": "comp-reg-v1",
  "instruction": "Focus on extracting company name and registration number accurately",
  "config": {},
  "type": "CUSTOM"
}
'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "KTP Verification",
"description": "Template for KTP document verification and data extraction",
"custom_id": "<string>",
"instruction": "<string>",
"schema": {
"name": {
"type": "string",
"required": true
},
"nik": {
"type": "string",
"required": true
},
"birth_date": {
"type": "date",
"required": true
}
},
"config": {},
"type": "CUSTOM",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT token obtained from /auth/login endpoint.

Example:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Body

application/json
name
string
required

Template name

Example:

"Company Registration Verification"

description
string
required

Template description

Example:

"Template for extracting company registration data"

schema
object
required

Data extraction schema definition

Example:
{
"company_name": { "type": "string", "required": true },
"registration_number": { "type": "string", "required": true },
"address": { "type": "string", "required": false }
}
custom_id
string | null

Custom identifier for the template

Example:

"comp-reg-v1"

instruction
string | null

Special instructions for template processing

Example:

"Focus on extracting company name and registration number accurately"

config
object

Template configuration settings

type
enum<string>
default:CUSTOM

Template type. Users can only create CUSTOM templates. PREBUILT templates are managed by AnyCheck admin (defaults to CUSTOM)

Available options:
CUSTOM,
PREBUILT

Response

Template created successfully

id
string<uuid>

Unique template identifier

name
string

Template name

Example:

"KTP Verification"

description
string

Template description

Example:

"Template for KTP document verification and data extraction"

custom_id
string | null

Custom identifier for the template

instruction
string | null

Special instructions for template processing

schema
object

Data extraction schema definition

Example:
{
"name": { "type": "string", "required": true },
"nik": { "type": "string", "required": true },
"birth_date": { "type": "date", "required": true }
}
config
object

Template configuration settings

type
enum<string>

Template type - custom or prebuilt

Available options:
CUSTOM,
PREBUILT
Example:

"CUSTOM"

created_at
string<date-time>

Template creation timestamp

updated_at
string<date-time> | null

Last update timestamp