Create an agent prompt
curl --request POST \
--url https://app.flextell.ai/api/v1/agent-prompts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"prompt": "<string>",
"is_active": true
}
'import requests
url = "https://app.flextell.ai/api/v1/agent-prompts"
payload = {
"prompt": "<string>",
"is_active": True
}
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompt: '<string>', is_active: true})
};
fetch('https://app.flextell.ai/api/v1/agent-prompts', 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://app.flextell.ai/api/v1/agent-prompts",
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>',
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Tenant: <x-tenant>"
],
]);
$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.flextell.ai/api/v1/agent-prompts"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Tenant", "<x-tenant>")
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.post("https://app.flextell.ai/api/v1/agent-prompts")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/agent-prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"success": "<string>",
"data": {
"id": 123,
"tenant_id": 123,
"type": "<string>",
"type_label": "<string>",
"language": "<string>",
"llm_model": "<string>",
"prompt": "<string>",
"is_active": true,
"can_activate": true,
"activation_restriction_reason": "<string>",
"stable_version_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"tenant": {
"id": 123,
"name": "<string>"
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"success": false,
"error_code": "SETUP_REQUIRED",
"message": "Complete the required setup steps to continue.",
"data": {
"next_step": "clinic_info"
}
}AI
Create an agent prompt
POST
/
v1
/
agent-prompts
Create an agent prompt
curl --request POST \
--url https://app.flextell.ai/api/v1/agent-prompts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"prompt": "<string>",
"is_active": true
}
'import requests
url = "https://app.flextell.ai/api/v1/agent-prompts"
payload = {
"prompt": "<string>",
"is_active": True
}
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompt: '<string>', is_active: true})
};
fetch('https://app.flextell.ai/api/v1/agent-prompts', 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://app.flextell.ai/api/v1/agent-prompts",
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>',
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Tenant: <x-tenant>"
],
]);
$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.flextell.ai/api/v1/agent-prompts"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Tenant", "<x-tenant>")
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.post("https://app.flextell.ai/api/v1/agent-prompts")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/agent-prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"success": "<string>",
"data": {
"id": 123,
"tenant_id": 123,
"type": "<string>",
"type_label": "<string>",
"language": "<string>",
"llm_model": "<string>",
"prompt": "<string>",
"is_active": true,
"can_activate": true,
"activation_restriction_reason": "<string>",
"stable_version_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"tenant": {
"id": 123,
"name": "<string>"
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"success": false,
"error_code": "SETUP_REQUIRED",
"message": "Complete the required setup steps to continue.",
"data": {
"next_step": "clinic_info"
}
}Yetkilendirmeler
oauth2bearer
The access token received from the authorization server in the OAuth 2.0 flow.
Başlıklar
Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.
Gövde
application/json
The agent type (greeter, booking, info, support, router, spam, ai_report, intake_router, intake).
Mevcut seçenekler:
greeter, booking, info, support, router, spam, ai_report, intake_router, intake The system prompt content for the agent.
Whether the agent prompt is active.
The language of the patients this prompt serves (tr or en). Defaults to tr. Each agent type has at most one active prompt per language.
Mevcut seçenekler:
tr, en The LLM model name to run this agent with, from the selectable models catalog. Null uses the system default model.
Mevcut seçenekler:
anthropic/claude-opus-5.5, openai/gpt-5.6-luna, openai/gpt-5.6-terra-pro, openai/gpt-5.6-terra, openai/gpt-5.6-sol-pro, openai/gpt-5.6-sol, anthropic/claude-sonnet-5, anthropic/claude-fable-5, anthropic/claude-opus-4.8, google/gemini-3.5-flash, google/gemini-3.1-flash-lite, x-ai/grok-4.3, openai/gpt-5.5-pro, anthropic/claude-opus-4.8-fast, openai/gpt-5.5, anthropic/claude-opus-4.7-fast, openai/gpt-chat-latest, openai/gpt-5-codex, x-ai/grok-4.5, x-ai/grok-build-0.1, openai/gpt-5.6-luna-pro, anthropic/claude-opus-4.7, google/gemma-4-26b-a4b-it, google/gemma-4-26b-a4b-it:free, openai/gpt-5.4-nano, openai/gpt-5.4-pro, openai/gpt-5.4, google/gemini-3.1-pro-preview, anthropic/claude-sonnet-4.6, anthropic/claude-opus-4.6, openai/gpt-5.3-chat, google/gemini-3.1-flash-lite-preview, deepseek/deepseek-v4-flash, x-ai/grok-4.20, google/gemini-3.1-pro-preview-customtools, openai/gpt-5.3-codex, google/gemma-4-31b-it, google/gemma-4-31b-it:free, openai/gpt-5.2-pro, openai/gpt-5.2, anthropic/claude-opus-4.5, openai/gpt-5.1, anthropic/claude-haiku-4.5, openai/gpt-5.1-chat, openai/gpt-oss-safeguard-20b, openai/gpt-5-pro, openai/o3-deep-research, openai/o4-mini-deep-research, anthropic/claude-sonnet-4.5, openai/gpt-5.2-chat, openai/gpt-5.1-codex-max, openai/gpt-5.1-codex, openai/gpt-5.1-codex-mini, deepseek/deepseek-v3.2-exp, openai/gpt-5.4-mini, deepseek/deepseek-chat-v3.1, openai/gpt-5, openai/gpt-5-nano, openai/gpt-oss-120b, openai/gpt-oss-20b, google/gemini-2.5-flash-lite, google/gemini-2.5-flash, openai/o3, openai/o4-mini, openai/gpt-4.1, openai/o3-pro, deepseek/deepseek-r1-0528, openai/o4-mini-high, openai/gpt-4.1-mini, openai/gpt-4.1-nano, google/gemini-2.5-pro, deepseek/deepseek-chat-v3-0324, google/gemma-3-12b-it, google/gemma-3-27b-it, openai/o3-mini-high, google/gemini-3-flash-preview, openai/gpt-4o, openai/o1, openai/gpt-4-turbo, openai/gpt-3.5-turbo-0613, openai/gpt-4-turbo-preview, openai/gpt-3.5-turbo-16k, deepseek/deepseek-chat, openai/gpt-4o-2024-11-20, openai/gpt-4o-2024-08-06, openai/gpt-4o-mini-2024-07-18, openai/gpt-4o-2024-05-13, anthropic/claude-haiku-5.5, openai/gpt-4, anthropic/claude-sonnet-5.5, openai/gpt-6.1-sol-pro, openai/gpt-6.1-sol, openai/gpt-6-luna-pro, openai/gpt-6-luna, openai/gpt-6-sol-pro, openai/gpt-6-sol, deepseek/deepseek-v4.1-flash, openai/gpt-6-astra, x-ai/grok-4.7, openai/gpt-6-astra-pro, google/gemini-3.8-flash, anthropic/claude-fable-5.1, google/gemini-3.7-flash, openai/gpt-5-mini, deepseek/deepseek-v4-flash-vision-exp, deepseek/deepseek-v4-pro-0813, x-ai/grok-4.6, deepseek/deepseek-v4-flash-0731, anthropic/claude-opus-5, google/gemini-3.6-flash, google/gemini-3.5-flash-lite, deepseek/deepseek-v4-pro, openai/gpt-5.2-codex, deepseek/deepseek-v3.2, deepseek/deepseek-v3.1-terminus, deepseek/deepseek-r1, openai/o3-mini, openai/gpt-4o-mini, openai/gpt-3.5-turbo, null