Skip to main content
POST
/
v4
/
templates
/
{templateId}
/
versions
Publish template version
curl --request POST \
  --url https://api.kadoa.com/v4/templates/{templateId}/versions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "schemaFields": [
    {
      "name": "<string>",
      "description": "<string>",
      "fieldType": "<string>",
      "example": "<string>",
      "dataType": "<string>",
      "isKey": true
    }
  ],
  "schemaEntity": "<string>",
  "dataValidation": {
    "rules": [
      {
        "name": "<string>",
        "ruleType": "regex",
        "parameters": {},
        "description": "<string>",
        "targetColumns": [
          "<string>"
        ],
        "status": "enabled",
        "metadata": {}
      }
    ]
  },
  "notifications": [
    {
      "eventType": "<string>",
      "eventConfiguration": {},
      "enabled": true,
      "channelIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "channels": [
        {
          "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      ]
    }
  ]
}
'
{
  "error": false,
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version": 123,
    "prompt": "<string>",
    "schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "<string>",
    "schemaFields": [
      {
        "name": "<string>",
        "description": "<string>",
        "fieldType": "<string>",
        "example": "<string>",
        "dataType": "<string>",
        "isKey": true
      }
    ],
    "dataValidation": {
      "rules": [
        {
          "name": "<string>",
          "ruleType": "regex",
          "parameters": {},
          "description": "<string>",
          "targetColumns": [
            "<string>"
          ],
          "status": "enabled",
          "metadata": {}
        }
      ]
    },
    "notificationSettings": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "eventType": "<string>",
        "eventConfiguration": {},
        "enabled": true,
        "channels": [
          {
            "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "channelName": "<string>",
            "channelType": "<string>"
          }
        ]
      }
    ],
    "validationRules": [
      {
        "name": "<string>",
        "ruleType": "regex",
        "parameters": {},
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "description": "<string>",
        "targetColumns": [
          "<string>"
        ],
        "status": "enabled",
        "metadata": {}
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication

Path Parameters

templateId
string<uuid>
required

Template ID

Body

application/json

Body

Request body for publishing a new template version

prompt
string

User prompt to copy into workflow config

schemaId
string<uuid>

data_schemas ID to reference (mutually exclusive with schemaFields)

schemaFields
object[]

Schema fields to create a new schema inline

schemaEntity
string

Entity name for the inline schema

dataValidation
object

Data validation rules and config

notifications
object[]

Notification configuration for this version

Response

201

Response for template version creation

error
enum<boolean>
required

Error flag (always false on success)

Available options:
false
success
enum<boolean>
required

Success flag

Available options:
true
data
object
required

Created version