cURL
curl --request PUT \
--url https://app.teable.ai/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"config":{"prompt":"string","model":"string","effort":"low","trigger":{"type":"schedule","rrule":"string","timezone":"string","starting":"2019-08-24T14:15:22Z","ending":"2019-08-24T14:15:22Z"},"maxRunMinutes":5,"chatMode":"new"}}'const url = 'https://app.teable.ai/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft';
const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"config":{"prompt":"string","model":"string","effort":"low","trigger":{"type":"schedule","rrule":"string","timezone":"string","starting":"2019-08-24T14:15:22Z","ending":"2019-08-24T14:15:22Z"},"maxRunMinutes":5,"chatMode":"new"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'PUT',
hostname: 'app.teable.ai',
port: null,
path: '/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
config: {
prompt: 'string',
model: 'string',
effort: 'low',
trigger: {
type: 'schedule',
rrule: 'string',
timezone: 'string',
starting: '2019-08-24T14:15:22Z',
ending: '2019-08-24T14:15:22Z'
},
maxRunMinutes: 5,
chatMode: 'new'
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"config\":{\"prompt\":\"string\",\"model\":\"string\",\"effort\":\"low\",\"trigger\":{\"type\":\"schedule\",\"rrule\":\"string\",\"timezone\":\"string\",\"starting\":\"2019-08-24T14:15:22Z\",\"ending\":\"2019-08-24T14:15:22Z\"},\"maxRunMinutes\":5,\"chatMode\":\"new\"}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("PUT", "/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'prompt' => '<string>',
'trigger' => [
'type' => 'schedule',
'rrule' => '<string>',
'timezone' => '<string>',
'starting' => '2023-11-07T05:31:56Z',
'ending' => '2023-11-07T05:31:56Z'
],
'model' => '<string>',
'maxRunMinutes' => 62
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft"
payload := strings.NewReader("{\n \"config\": {\n \"prompt\": \"<string>\",\n \"trigger\": {\n \"type\": \"schedule\",\n \"rrule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"starting\": \"2023-11-07T05:31:56Z\",\n \"ending\": \"2023-11-07T05:31:56Z\"\n },\n \"model\": \"<string>\",\n \"maxRunMinutes\": 62\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"prompt\": \"<string>\",\n \"trigger\": {\n \"type\": \"schedule\",\n \"rrule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"starting\": \"2023-11-07T05:31:56Z\",\n \"ending\": \"2023-11-07T05:31:56Z\"\n },\n \"model\": \"<string>\",\n \"maxRunMinutes\": 62\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"prompt\": \"<string>\",\n \"trigger\": {\n \"type\": \"schedule\",\n \"rrule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"starting\": \"2023-11-07T05:31:56Z\",\n \"ending\": \"2023-11-07T05:31:56Z\"\n },\n \"model\": \"<string>\",\n \"maxRunMinutes\": 62\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"baseId": "<string>",
"name": "<string>",
"status": "draft",
"currentSnapshotId": "<string>",
"config": {
"prompt": "<string>",
"trigger": {
"type": "schedule",
"rrule": "<string>",
"timezone": "<string>",
"starting": "2023-11-07T05:31:56Z",
"ending": "2023-11-07T05:31:56Z"
},
"model": "<string>",
"effort": "low",
"maxRunMinutes": 62,
"chatMode": "new"
},
"hasDraft": true,
"createdBy": "<string>",
"createdTime": "<string>",
"lastModifiedBy": "<string>",
"lastModifiedTime": "<string>",
"nextRunAt": "<string>",
"alertContact": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar": "<string>"
}
}routine
Save routine draft
Stores edits without changing what runs. Scheduled runs keep using the published snapshot until the draft is published. A draft matching the published config is cleared instead of stored.
Required token scopes: routine|update
PUT
/
base
/
{baseId}
/
routine
/
{routineId}
/
draft
cURL
curl --request PUT \
--url https://app.teable.ai/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"config":{"prompt":"string","model":"string","effort":"low","trigger":{"type":"schedule","rrule":"string","timezone":"string","starting":"2019-08-24T14:15:22Z","ending":"2019-08-24T14:15:22Z"},"maxRunMinutes":5,"chatMode":"new"}}'const url = 'https://app.teable.ai/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft';
const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"config":{"prompt":"string","model":"string","effort":"low","trigger":{"type":"schedule","rrule":"string","timezone":"string","starting":"2019-08-24T14:15:22Z","ending":"2019-08-24T14:15:22Z"},"maxRunMinutes":5,"chatMode":"new"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'PUT',
hostname: 'app.teable.ai',
port: null,
path: '/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
config: {
prompt: 'string',
model: 'string',
effort: 'low',
trigger: {
type: 'schedule',
rrule: 'string',
timezone: 'string',
starting: '2019-08-24T14:15:22Z',
ending: '2019-08-24T14:15:22Z'
},
maxRunMinutes: 5,
chatMode: 'new'
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"config\":{\"prompt\":\"string\",\"model\":\"string\",\"effort\":\"low\",\"trigger\":{\"type\":\"schedule\",\"rrule\":\"string\",\"timezone\":\"string\",\"starting\":\"2019-08-24T14:15:22Z\",\"ending\":\"2019-08-24T14:15:22Z\"},\"maxRunMinutes\":5,\"chatMode\":\"new\"}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("PUT", "/api/base/%7BbaseId%7D/routine/%7BroutineId%7D/draft", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'prompt' => '<string>',
'trigger' => [
'type' => 'schedule',
'rrule' => '<string>',
'timezone' => '<string>',
'starting' => '2023-11-07T05:31:56Z',
'ending' => '2023-11-07T05:31:56Z'
],
'model' => '<string>',
'maxRunMinutes' => 62
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft"
payload := strings.NewReader("{\n \"config\": {\n \"prompt\": \"<string>\",\n \"trigger\": {\n \"type\": \"schedule\",\n \"rrule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"starting\": \"2023-11-07T05:31:56Z\",\n \"ending\": \"2023-11-07T05:31:56Z\"\n },\n \"model\": \"<string>\",\n \"maxRunMinutes\": 62\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"prompt\": \"<string>\",\n \"trigger\": {\n \"type\": \"schedule\",\n \"rrule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"starting\": \"2023-11-07T05:31:56Z\",\n \"ending\": \"2023-11-07T05:31:56Z\"\n },\n \"model\": \"<string>\",\n \"maxRunMinutes\": 62\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/base/{baseId}/routine/{routineId}/draft")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"prompt\": \"<string>\",\n \"trigger\": {\n \"type\": \"schedule\",\n \"rrule\": \"<string>\",\n \"timezone\": \"<string>\",\n \"starting\": \"2023-11-07T05:31:56Z\",\n \"ending\": \"2023-11-07T05:31:56Z\"\n },\n \"model\": \"<string>\",\n \"maxRunMinutes\": 62\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"baseId": "<string>",
"name": "<string>",
"status": "draft",
"currentSnapshotId": "<string>",
"config": {
"prompt": "<string>",
"trigger": {
"type": "schedule",
"rrule": "<string>",
"timezone": "<string>",
"starting": "2023-11-07T05:31:56Z",
"ending": "2023-11-07T05:31:56Z"
},
"model": "<string>",
"effort": "low",
"maxRunMinutes": 62,
"chatMode": "new"
},
"hasDraft": true,
"createdBy": "<string>",
"createdTime": "<string>",
"lastModifiedBy": "<string>",
"lastModifiedTime": "<string>",
"nextRunAt": "<string>",
"alertContact": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar": "<string>"
}
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Antwort
200 - application/json
Draft saved
Verfügbare Optionen:
draft, active, inactive Show child attributes
Show child attributes
Show child attributes
Show child attributes
Zuletzt geändert am 15. September 2026
War diese Seite hilfreich?

