Skip to main content
PUT
/
templates
/
{id}
Update template
curl --request PUT \
  --url https://api.anycheck.ai/templates/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated Company Registration Verification",
  "description": "Updated template for extracting company registration data",
  "custom_id": "comp-reg-v2",
  "instruction": "Focus on extracting company name, registration number, and founding date accurately",
  "schema": {
    "company_name": {
      "type": "string",
      "required": true
    },
    "registration_number": {
      "type": "string",
      "required": true
    },
    "founding_date": {
      "type": "date",
      "required": true
    },
    "address": {
      "type": "string",
      "required": false
    }
  },
  "config": {}
}
'
{
"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...

Path Parameters

id
string<uuid>
required

Resource UUID

Body

application/json
name
string

Updated template name

Example:

"Updated Company Registration Verification"

description
string

Updated template description

Example:

"Updated template for extracting company registration data"

custom_id
string | null

Updated custom identifier

Example:

"comp-reg-v2"

instruction
string | null

Updated special instructions

Example:

"Focus on extracting company name, registration number, and founding date accurately"

schema
object

Updated data extraction schema

Example:
{
"company_name": { "type": "string", "required": true },
"registration_number": { "type": "string", "required": true },
"founding_date": { "type": "date", "required": true },
"address": { "type": "string", "required": false }
}
config
object

Updated template configuration settings

Response

Template updated 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