Skip to main content
POST
/
v4
/
schemas
/
Create new schema
curl --request POST \
  --url https://api.kadoa.com/v4/schemas/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "entity": "<string>",
  "fields": [
    {
      "name": "<string>",
      "description": "<string>",
      "fieldType": "SCHEMA",
      "example": "<string>",
      "dataType": "STRING",
      "isKey": true
    }
  ]
}'
{
  "error": true,
  "success": true,
  "schemaId": "<string>",
  "message": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json

Body

Request body for creating a new schema

name
string
required

Name of the schema

Required string length: 1 - 255
entity
string
required

Entity type for the schema

Minimum length: 1
fields
(ExtractionSchemaField · object | ExtractionMetadataField · object | ExtractionClassificationField · object)[]
required

Array of field definitions

Minimum length: 1
  • ExtractionSchemaField
  • ExtractionMetadataField
  • ExtractionClassificationField

Response

201

Response for schema creation

error
boolean
required

Error flag (always false on success)

success
boolean
required

Success flag

schemaId
string
required

ID of the created schema

message
string
required

Success message

createdAt
string

Creation timestamp

updatedAt
string

Last update timestamp

I