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>",
"instruction": "<string>",
"fieldType": "<string>",
"example": "<unknown>",
"shape": "<unknown>",
"dataType": "<string>",
"isKey": true,
"categories": [
{
"title": "<string>",
"definition": "<string>"
}
]
}
],
"schemaEntity": "<string>",
"schemaValidationRules": {},
"notifications": [
{
"eventType": "<string>",
"eventConfiguration": {},
"enabled": true,
"channelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
],
"frequency": {
"schedules": [
{
"interval": "<string>",
"expressions": [
"<string>"
]
}
]
}
}
'import requests
url = "https://api.kadoa.com/v4/templates/{templateId}/versions"
payload = {
"prompt": "<string>",
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"schemaFields": [
{
"name": "<string>",
"description": "<string>",
"instruction": "<string>",
"fieldType": "<string>",
"example": "<unknown>",
"shape": "<unknown>",
"dataType": "<string>",
"isKey": True,
"categories": [
{
"title": "<string>",
"definition": "<string>"
}
]
}
],
"schemaEntity": "<string>",
"schemaValidationRules": {},
"notifications": [
{
"eventType": "<string>",
"eventConfiguration": {},
"enabled": True,
"channelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"channels": [{ "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }]
}
],
"frequency": { "schedules": [
{
"interval": "<string>",
"expressions": ["<string>"]
}
] }
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
schemaId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
schemaFields: [
{
name: '<string>',
description: '<string>',
instruction: '<string>',
fieldType: '<string>',
example: '<unknown>',
shape: '<unknown>',
dataType: '<string>',
isKey: true,
categories: [{title: '<string>', definition: '<string>'}]
}
],
schemaEntity: '<string>',
schemaValidationRules: {},
notifications: [
{
eventType: '<string>',
eventConfiguration: {},
enabled: true,
channelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
channels: [{channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}]
}
],
frequency: {schedules: [{interval: '<string>', expressions: ['<string>']}]}
})
};
fetch('https://api.kadoa.com/v4/templates/{templateId}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kadoa.com/v4/templates/{templateId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'schemaId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'schemaFields' => [
[
'name' => '<string>',
'description' => '<string>',
'instruction' => '<string>',
'fieldType' => '<string>',
'example' => '<unknown>',
'shape' => '<unknown>',
'dataType' => '<string>',
'isKey' => true,
'categories' => [
[
'title' => '<string>',
'definition' => '<string>'
]
]
]
],
'schemaEntity' => '<string>',
'schemaValidationRules' => [
],
'notifications' => [
[
'eventType' => '<string>',
'eventConfiguration' => [
],
'enabled' => true,
'channelIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'channels' => [
[
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
],
'frequency' => [
'schedules' => [
[
'interval' => '<string>',
'expressions' => [
'<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kadoa.com/v4/templates/{templateId}/versions"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"schemaId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"schemaFields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instruction\": \"<string>\",\n \"fieldType\": \"<string>\",\n \"example\": \"<unknown>\",\n \"shape\": \"<unknown>\",\n \"dataType\": \"<string>\",\n \"isKey\": true,\n \"categories\": [\n {\n \"title\": \"<string>\",\n \"definition\": \"<string>\"\n }\n ]\n }\n ],\n \"schemaEntity\": \"<string>\",\n \"schemaValidationRules\": {},\n \"notifications\": [\n {\n \"eventType\": \"<string>\",\n \"eventConfiguration\": {},\n \"enabled\": true,\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n }\n ],\n \"frequency\": {\n \"schedules\": [\n {\n \"interval\": \"<string>\",\n \"expressions\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kadoa.com/v4/templates/{templateId}/versions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"schemaId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"schemaFields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instruction\": \"<string>\",\n \"fieldType\": \"<string>\",\n \"example\": \"<unknown>\",\n \"shape\": \"<unknown>\",\n \"dataType\": \"<string>\",\n \"isKey\": true,\n \"categories\": [\n {\n \"title\": \"<string>\",\n \"definition\": \"<string>\"\n }\n ]\n }\n ],\n \"schemaEntity\": \"<string>\",\n \"schemaValidationRules\": {},\n \"notifications\": [\n {\n \"eventType\": \"<string>\",\n \"eventConfiguration\": {},\n \"enabled\": true,\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n }\n ],\n \"frequency\": {\n \"schedules\": [\n {\n \"interval\": \"<string>\",\n \"expressions\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kadoa.com/v4/templates/{templateId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"schemaId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"schemaFields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instruction\": \"<string>\",\n \"fieldType\": \"<string>\",\n \"example\": \"<unknown>\",\n \"shape\": \"<unknown>\",\n \"dataType\": \"<string>\",\n \"isKey\": true,\n \"categories\": [\n {\n \"title\": \"<string>\",\n \"definition\": \"<string>\"\n }\n ]\n }\n ],\n \"schemaEntity\": \"<string>\",\n \"schemaValidationRules\": {},\n \"notifications\": [\n {\n \"eventType\": \"<string>\",\n \"eventConfiguration\": {},\n \"enabled\": true,\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n }\n ],\n \"frequency\": {\n \"schedules\": [\n {\n \"interval\": \"<string>\",\n \"expressions\": [\n \"<string>\"\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"error": false,
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"name": "<string>",
"prompt": "<string>",
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"frequency": {
"schedules": [
{
"interval": "<string>",
"expressions": [
"<string>"
]
}
]
},
"createdAt": "<string>",
"schemaFields": [
{
"name": "<string>",
"description": "<string>",
"instruction": "<string>",
"fieldType": "<string>",
"example": "<unknown>",
"shape": "<unknown>",
"dataType": "<string>",
"isKey": true,
"categories": [
{
"title": "<string>",
"definition": "<string>"
}
]
}
],
"schemaValidationRules": {},
"notifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventType": "<string>",
"eventConfiguration": {},
"enabled": true,
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channelName": "<string>",
"channelType": "<string>"
}
]
}
]
}
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}Templates
Create template version
Publish a new version of a template with prompt, schema, validation, and notification settings
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>",
"instruction": "<string>",
"fieldType": "<string>",
"example": "<unknown>",
"shape": "<unknown>",
"dataType": "<string>",
"isKey": true,
"categories": [
{
"title": "<string>",
"definition": "<string>"
}
]
}
],
"schemaEntity": "<string>",
"schemaValidationRules": {},
"notifications": [
{
"eventType": "<string>",
"eventConfiguration": {},
"enabled": true,
"channelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
],
"frequency": {
"schedules": [
{
"interval": "<string>",
"expressions": [
"<string>"
]
}
]
}
}
'import requests
url = "https://api.kadoa.com/v4/templates/{templateId}/versions"
payload = {
"prompt": "<string>",
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"schemaFields": [
{
"name": "<string>",
"description": "<string>",
"instruction": "<string>",
"fieldType": "<string>",
"example": "<unknown>",
"shape": "<unknown>",
"dataType": "<string>",
"isKey": True,
"categories": [
{
"title": "<string>",
"definition": "<string>"
}
]
}
],
"schemaEntity": "<string>",
"schemaValidationRules": {},
"notifications": [
{
"eventType": "<string>",
"eventConfiguration": {},
"enabled": True,
"channelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"channels": [{ "channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }]
}
],
"frequency": { "schedules": [
{
"interval": "<string>",
"expressions": ["<string>"]
}
] }
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
schemaId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
schemaFields: [
{
name: '<string>',
description: '<string>',
instruction: '<string>',
fieldType: '<string>',
example: '<unknown>',
shape: '<unknown>',
dataType: '<string>',
isKey: true,
categories: [{title: '<string>', definition: '<string>'}]
}
],
schemaEntity: '<string>',
schemaValidationRules: {},
notifications: [
{
eventType: '<string>',
eventConfiguration: {},
enabled: true,
channelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
channels: [{channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}]
}
],
frequency: {schedules: [{interval: '<string>', expressions: ['<string>']}]}
})
};
fetch('https://api.kadoa.com/v4/templates/{templateId}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kadoa.com/v4/templates/{templateId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'schemaId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'schemaFields' => [
[
'name' => '<string>',
'description' => '<string>',
'instruction' => '<string>',
'fieldType' => '<string>',
'example' => '<unknown>',
'shape' => '<unknown>',
'dataType' => '<string>',
'isKey' => true,
'categories' => [
[
'title' => '<string>',
'definition' => '<string>'
]
]
]
],
'schemaEntity' => '<string>',
'schemaValidationRules' => [
],
'notifications' => [
[
'eventType' => '<string>',
'eventConfiguration' => [
],
'enabled' => true,
'channelIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'channels' => [
[
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
],
'frequency' => [
'schedules' => [
[
'interval' => '<string>',
'expressions' => [
'<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kadoa.com/v4/templates/{templateId}/versions"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"schemaId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"schemaFields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instruction\": \"<string>\",\n \"fieldType\": \"<string>\",\n \"example\": \"<unknown>\",\n \"shape\": \"<unknown>\",\n \"dataType\": \"<string>\",\n \"isKey\": true,\n \"categories\": [\n {\n \"title\": \"<string>\",\n \"definition\": \"<string>\"\n }\n ]\n }\n ],\n \"schemaEntity\": \"<string>\",\n \"schemaValidationRules\": {},\n \"notifications\": [\n {\n \"eventType\": \"<string>\",\n \"eventConfiguration\": {},\n \"enabled\": true,\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n }\n ],\n \"frequency\": {\n \"schedules\": [\n {\n \"interval\": \"<string>\",\n \"expressions\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kadoa.com/v4/templates/{templateId}/versions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"schemaId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"schemaFields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instruction\": \"<string>\",\n \"fieldType\": \"<string>\",\n \"example\": \"<unknown>\",\n \"shape\": \"<unknown>\",\n \"dataType\": \"<string>\",\n \"isKey\": true,\n \"categories\": [\n {\n \"title\": \"<string>\",\n \"definition\": \"<string>\"\n }\n ]\n }\n ],\n \"schemaEntity\": \"<string>\",\n \"schemaValidationRules\": {},\n \"notifications\": [\n {\n \"eventType\": \"<string>\",\n \"eventConfiguration\": {},\n \"enabled\": true,\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n }\n ],\n \"frequency\": {\n \"schedules\": [\n {\n \"interval\": \"<string>\",\n \"expressions\": [\n \"<string>\"\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kadoa.com/v4/templates/{templateId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"schemaId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"schemaFields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instruction\": \"<string>\",\n \"fieldType\": \"<string>\",\n \"example\": \"<unknown>\",\n \"shape\": \"<unknown>\",\n \"dataType\": \"<string>\",\n \"isKey\": true,\n \"categories\": [\n {\n \"title\": \"<string>\",\n \"definition\": \"<string>\"\n }\n ]\n }\n ],\n \"schemaEntity\": \"<string>\",\n \"schemaValidationRules\": {},\n \"notifications\": [\n {\n \"eventType\": \"<string>\",\n \"eventConfiguration\": {},\n \"enabled\": true,\n \"channelIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"channels\": [\n {\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n }\n ],\n \"frequency\": {\n \"schedules\": [\n {\n \"interval\": \"<string>\",\n \"expressions\": [\n \"<string>\"\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"error": false,
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"name": "<string>",
"prompt": "<string>",
"schemaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"frequency": {
"schedules": [
{
"interval": "<string>",
"expressions": [
"<string>"
]
}
]
},
"createdAt": "<string>",
"schemaFields": [
{
"name": "<string>",
"description": "<string>",
"instruction": "<string>",
"fieldType": "<string>",
"example": "<unknown>",
"shape": "<unknown>",
"dataType": "<string>",
"isKey": true,
"categories": [
{
"title": "<string>",
"definition": "<string>"
}
]
}
],
"schemaValidationRules": {},
"notifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventType": "<string>",
"eventConfiguration": {},
"enabled": true,
"channels": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channelName": "<string>",
"channelType": "<string>"
}
]
}
]
}
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}{
"error": true,
"message": "<string>",
"details": "<unknown>"
}Authorizations
API key for authentication
Path Parameters
Template ID
Body
application/json
Body
Request body for publishing a new template version
User prompt to copy into workflow config
data_schemas ID to reference (mutually exclusive with schemaFields)
Schema fields to create a new schema inline
Show child attributes
Show child attributes
Entity name for the inline schema
Schema validation rules to include in this version
Show child attributes
Show child attributes
Notification configuration for this version
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I