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>",
  "fields": [
    {
      "name": "<string>",
      "description": "<string>",
      "dataType": "STRING",
      "fieldType": "SCHEMA",
      "example": "<string>",
      "isKey": true
    }
  ],
  "entity": "<string>"
}'
{
  "error": false,
  "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
fields
(DataField · object | RawContentField · object | ClassificationField · object)[]
required

Schema fields for extraction - choose from Data Field (typed data), Raw Content Field (HTML/Markdown), or Classification Field (predefined categories)

Minimum array length: 1

Extraction field schema

  • DataField
  • RawContentField
  • ClassificationField
entity
string

Entity type for the schema

Minimum string length: 1

Response

201

Response for schema creation

error
enum<boolean>
required

Error flag (always false on success)

Available options:
true,
false
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