Create a new assistant
curl --request POST \
--url https://api.devic.ai/v1/assistants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Assistant",
"description": "<string>",
"presets": "<string>",
"model": "<string>",
"provider": "<string>",
"imgUrl": "<string>",
"availableToolsGroupsUids": [
"<string>"
],
"enabledTools": [
"<string>"
],
"accessConfiguration": {
"externalAccess": true,
"visibilityByRole": [
"<string>"
]
},
"widgetConfiguration": {
"enabled": true,
"sourcesWhiteList": [
"<string>"
],
"color": "<string>",
"welcomeMessage": "<string>"
},
"memoryDocuments": [
{}
],
"structuredOutput": {},
"guardrailsConfiguration": {
"enabled": true,
"guardrails": {}
},
"codeSnippetIds": [
"<string>"
],
"availableSkillIds": [
"<string>"
],
"subagentsIds": [
"<string>"
],
"maxChatMessages": 123,
"maxToolResponseInputTokens": 123,
"contextManagement": {
"fullContextTurnDepth": 123,
"alwaysIncludeUserMessages": true
}
}
'import requests
url = "https://api.devic.ai/v1/assistants"
payload = {
"name": "Customer Support Assistant",
"description": "<string>",
"presets": "<string>",
"model": "<string>",
"provider": "<string>",
"imgUrl": "<string>",
"availableToolsGroupsUids": ["<string>"],
"enabledTools": ["<string>"],
"accessConfiguration": {
"externalAccess": True,
"visibilityByRole": ["<string>"]
},
"widgetConfiguration": {
"enabled": True,
"sourcesWhiteList": ["<string>"],
"color": "<string>",
"welcomeMessage": "<string>"
},
"memoryDocuments": [{}],
"structuredOutput": {},
"guardrailsConfiguration": {
"enabled": True,
"guardrails": {}
},
"codeSnippetIds": ["<string>"],
"availableSkillIds": ["<string>"],
"subagentsIds": ["<string>"],
"maxChatMessages": 123,
"maxToolResponseInputTokens": 123,
"contextManagement": {
"fullContextTurnDepth": 123,
"alwaysIncludeUserMessages": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Support Assistant',
description: '<string>',
presets: '<string>',
model: '<string>',
provider: '<string>',
imgUrl: '<string>',
availableToolsGroupsUids: ['<string>'],
enabledTools: ['<string>'],
accessConfiguration: {externalAccess: true, visibilityByRole: ['<string>']},
widgetConfiguration: {
enabled: true,
sourcesWhiteList: ['<string>'],
color: '<string>',
welcomeMessage: '<string>'
},
memoryDocuments: [{}],
structuredOutput: {},
guardrailsConfiguration: {enabled: true, guardrails: {}},
codeSnippetIds: ['<string>'],
availableSkillIds: ['<string>'],
subagentsIds: ['<string>'],
maxChatMessages: 123,
maxToolResponseInputTokens: 123,
contextManagement: {fullContextTurnDepth: 123, alwaysIncludeUserMessages: true}
})
};
fetch('https://api.devic.ai/v1/assistants', 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.devic.ai/v1/assistants",
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([
'name' => 'Customer Support Assistant',
'description' => '<string>',
'presets' => '<string>',
'model' => '<string>',
'provider' => '<string>',
'imgUrl' => '<string>',
'availableToolsGroupsUids' => [
'<string>'
],
'enabledTools' => [
'<string>'
],
'accessConfiguration' => [
'externalAccess' => true,
'visibilityByRole' => [
'<string>'
]
],
'widgetConfiguration' => [
'enabled' => true,
'sourcesWhiteList' => [
'<string>'
],
'color' => '<string>',
'welcomeMessage' => '<string>'
],
'memoryDocuments' => [
[
]
],
'structuredOutput' => [
],
'guardrailsConfiguration' => [
'enabled' => true,
'guardrails' => [
]
],
'codeSnippetIds' => [
'<string>'
],
'availableSkillIds' => [
'<string>'
],
'subagentsIds' => [
'<string>'
],
'maxChatMessages' => 123,
'maxToolResponseInputTokens' => 123,
'contextManagement' => [
'fullContextTurnDepth' => 123,
'alwaysIncludeUserMessages' => true
]
]),
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://api.devic.ai/v1/assistants"
payload := strings.NewReader("{\n \"name\": \"Customer Support Assistant\",\n \"description\": \"<string>\",\n \"presets\": \"<string>\",\n \"model\": \"<string>\",\n \"provider\": \"<string>\",\n \"imgUrl\": \"<string>\",\n \"availableToolsGroupsUids\": [\n \"<string>\"\n ],\n \"enabledTools\": [\n \"<string>\"\n ],\n \"accessConfiguration\": {\n \"externalAccess\": true,\n \"visibilityByRole\": [\n \"<string>\"\n ]\n },\n \"widgetConfiguration\": {\n \"enabled\": true,\n \"sourcesWhiteList\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"welcomeMessage\": \"<string>\"\n },\n \"memoryDocuments\": [\n {}\n ],\n \"structuredOutput\": {},\n \"guardrailsConfiguration\": {\n \"enabled\": true,\n \"guardrails\": {}\n },\n \"codeSnippetIds\": [\n \"<string>\"\n ],\n \"availableSkillIds\": [\n \"<string>\"\n ],\n \"subagentsIds\": [\n \"<string>\"\n ],\n \"maxChatMessages\": 123,\n \"maxToolResponseInputTokens\": 123,\n \"contextManagement\": {\n \"fullContextTurnDepth\": 123,\n \"alwaysIncludeUserMessages\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.devic.ai/v1/assistants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Assistant\",\n \"description\": \"<string>\",\n \"presets\": \"<string>\",\n \"model\": \"<string>\",\n \"provider\": \"<string>\",\n \"imgUrl\": \"<string>\",\n \"availableToolsGroupsUids\": [\n \"<string>\"\n ],\n \"enabledTools\": [\n \"<string>\"\n ],\n \"accessConfiguration\": {\n \"externalAccess\": true,\n \"visibilityByRole\": [\n \"<string>\"\n ]\n },\n \"widgetConfiguration\": {\n \"enabled\": true,\n \"sourcesWhiteList\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"welcomeMessage\": \"<string>\"\n },\n \"memoryDocuments\": [\n {}\n ],\n \"structuredOutput\": {},\n \"guardrailsConfiguration\": {\n \"enabled\": true,\n \"guardrails\": {}\n },\n \"codeSnippetIds\": [\n \"<string>\"\n ],\n \"availableSkillIds\": [\n \"<string>\"\n ],\n \"subagentsIds\": [\n \"<string>\"\n ],\n \"maxChatMessages\": 123,\n \"maxToolResponseInputTokens\": 123,\n \"contextManagement\": {\n \"fullContextTurnDepth\": 123,\n \"alwaysIncludeUserMessages\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/assistants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Assistant\",\n \"description\": \"<string>\",\n \"presets\": \"<string>\",\n \"model\": \"<string>\",\n \"provider\": \"<string>\",\n \"imgUrl\": \"<string>\",\n \"availableToolsGroupsUids\": [\n \"<string>\"\n ],\n \"enabledTools\": [\n \"<string>\"\n ],\n \"accessConfiguration\": {\n \"externalAccess\": true,\n \"visibilityByRole\": [\n \"<string>\"\n ]\n },\n \"widgetConfiguration\": {\n \"enabled\": true,\n \"sourcesWhiteList\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"welcomeMessage\": \"<string>\"\n },\n \"memoryDocuments\": [\n {}\n ],\n \"structuredOutput\": {},\n \"guardrailsConfiguration\": {\n \"enabled\": true,\n \"guardrails\": {}\n },\n \"codeSnippetIds\": [\n \"<string>\"\n ],\n \"availableSkillIds\": [\n \"<string>\"\n ],\n \"subagentsIds\": [\n \"<string>\"\n ],\n \"maxChatMessages\": 123,\n \"maxToolResponseInputTokens\": 123,\n \"contextManagement\": {\n \"fullContextTurnDepth\": 123,\n \"alwaysIncludeUserMessages\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"identifier": "<string>",
"name": "<string>",
"description": "<string>",
"presets": "<string>",
"model": "<string>",
"provider": "<string>",
"imgUrl": "<string>",
"state": "<string>",
"availableToolsGroupsUids": [
"<string>"
],
"enabledTools": [
"<string>"
],
"accessConfiguration": {},
"widgetConfiguration": {},
"memoryDocuments": [
{}
],
"structuredOutput": {},
"guardrailsConfiguration": {},
"codeSnippetIds": [
"<string>"
],
"availableSkillIds": [
"<string>"
],
"subagentsIds": [
"<string>"
],
"maxChatMessages": 123,
"maxToolResponseInputTokens": 123,
"contextManagement": {
"fullContextTurnDepth": 123,
"alwaysIncludeUserMessages": true
},
"creationTimestampMs": 123,
"lastEditTimestampMs": 123,
"reasoningEffort": "none"
}Assistants
Create a new assistant
Creates a new assistant with the provided configuration.
POST
/
v1
/
assistants
Create a new assistant
curl --request POST \
--url https://api.devic.ai/v1/assistants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Assistant",
"description": "<string>",
"presets": "<string>",
"model": "<string>",
"provider": "<string>",
"imgUrl": "<string>",
"availableToolsGroupsUids": [
"<string>"
],
"enabledTools": [
"<string>"
],
"accessConfiguration": {
"externalAccess": true,
"visibilityByRole": [
"<string>"
]
},
"widgetConfiguration": {
"enabled": true,
"sourcesWhiteList": [
"<string>"
],
"color": "<string>",
"welcomeMessage": "<string>"
},
"memoryDocuments": [
{}
],
"structuredOutput": {},
"guardrailsConfiguration": {
"enabled": true,
"guardrails": {}
},
"codeSnippetIds": [
"<string>"
],
"availableSkillIds": [
"<string>"
],
"subagentsIds": [
"<string>"
],
"maxChatMessages": 123,
"maxToolResponseInputTokens": 123,
"contextManagement": {
"fullContextTurnDepth": 123,
"alwaysIncludeUserMessages": true
}
}
'import requests
url = "https://api.devic.ai/v1/assistants"
payload = {
"name": "Customer Support Assistant",
"description": "<string>",
"presets": "<string>",
"model": "<string>",
"provider": "<string>",
"imgUrl": "<string>",
"availableToolsGroupsUids": ["<string>"],
"enabledTools": ["<string>"],
"accessConfiguration": {
"externalAccess": True,
"visibilityByRole": ["<string>"]
},
"widgetConfiguration": {
"enabled": True,
"sourcesWhiteList": ["<string>"],
"color": "<string>",
"welcomeMessage": "<string>"
},
"memoryDocuments": [{}],
"structuredOutput": {},
"guardrailsConfiguration": {
"enabled": True,
"guardrails": {}
},
"codeSnippetIds": ["<string>"],
"availableSkillIds": ["<string>"],
"subagentsIds": ["<string>"],
"maxChatMessages": 123,
"maxToolResponseInputTokens": 123,
"contextManagement": {
"fullContextTurnDepth": 123,
"alwaysIncludeUserMessages": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Support Assistant',
description: '<string>',
presets: '<string>',
model: '<string>',
provider: '<string>',
imgUrl: '<string>',
availableToolsGroupsUids: ['<string>'],
enabledTools: ['<string>'],
accessConfiguration: {externalAccess: true, visibilityByRole: ['<string>']},
widgetConfiguration: {
enabled: true,
sourcesWhiteList: ['<string>'],
color: '<string>',
welcomeMessage: '<string>'
},
memoryDocuments: [{}],
structuredOutput: {},
guardrailsConfiguration: {enabled: true, guardrails: {}},
codeSnippetIds: ['<string>'],
availableSkillIds: ['<string>'],
subagentsIds: ['<string>'],
maxChatMessages: 123,
maxToolResponseInputTokens: 123,
contextManagement: {fullContextTurnDepth: 123, alwaysIncludeUserMessages: true}
})
};
fetch('https://api.devic.ai/v1/assistants', 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.devic.ai/v1/assistants",
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([
'name' => 'Customer Support Assistant',
'description' => '<string>',
'presets' => '<string>',
'model' => '<string>',
'provider' => '<string>',
'imgUrl' => '<string>',
'availableToolsGroupsUids' => [
'<string>'
],
'enabledTools' => [
'<string>'
],
'accessConfiguration' => [
'externalAccess' => true,
'visibilityByRole' => [
'<string>'
]
],
'widgetConfiguration' => [
'enabled' => true,
'sourcesWhiteList' => [
'<string>'
],
'color' => '<string>',
'welcomeMessage' => '<string>'
],
'memoryDocuments' => [
[
]
],
'structuredOutput' => [
],
'guardrailsConfiguration' => [
'enabled' => true,
'guardrails' => [
]
],
'codeSnippetIds' => [
'<string>'
],
'availableSkillIds' => [
'<string>'
],
'subagentsIds' => [
'<string>'
],
'maxChatMessages' => 123,
'maxToolResponseInputTokens' => 123,
'contextManagement' => [
'fullContextTurnDepth' => 123,
'alwaysIncludeUserMessages' => true
]
]),
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://api.devic.ai/v1/assistants"
payload := strings.NewReader("{\n \"name\": \"Customer Support Assistant\",\n \"description\": \"<string>\",\n \"presets\": \"<string>\",\n \"model\": \"<string>\",\n \"provider\": \"<string>\",\n \"imgUrl\": \"<string>\",\n \"availableToolsGroupsUids\": [\n \"<string>\"\n ],\n \"enabledTools\": [\n \"<string>\"\n ],\n \"accessConfiguration\": {\n \"externalAccess\": true,\n \"visibilityByRole\": [\n \"<string>\"\n ]\n },\n \"widgetConfiguration\": {\n \"enabled\": true,\n \"sourcesWhiteList\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"welcomeMessage\": \"<string>\"\n },\n \"memoryDocuments\": [\n {}\n ],\n \"structuredOutput\": {},\n \"guardrailsConfiguration\": {\n \"enabled\": true,\n \"guardrails\": {}\n },\n \"codeSnippetIds\": [\n \"<string>\"\n ],\n \"availableSkillIds\": [\n \"<string>\"\n ],\n \"subagentsIds\": [\n \"<string>\"\n ],\n \"maxChatMessages\": 123,\n \"maxToolResponseInputTokens\": 123,\n \"contextManagement\": {\n \"fullContextTurnDepth\": 123,\n \"alwaysIncludeUserMessages\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.devic.ai/v1/assistants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Assistant\",\n \"description\": \"<string>\",\n \"presets\": \"<string>\",\n \"model\": \"<string>\",\n \"provider\": \"<string>\",\n \"imgUrl\": \"<string>\",\n \"availableToolsGroupsUids\": [\n \"<string>\"\n ],\n \"enabledTools\": [\n \"<string>\"\n ],\n \"accessConfiguration\": {\n \"externalAccess\": true,\n \"visibilityByRole\": [\n \"<string>\"\n ]\n },\n \"widgetConfiguration\": {\n \"enabled\": true,\n \"sourcesWhiteList\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"welcomeMessage\": \"<string>\"\n },\n \"memoryDocuments\": [\n {}\n ],\n \"structuredOutput\": {},\n \"guardrailsConfiguration\": {\n \"enabled\": true,\n \"guardrails\": {}\n },\n \"codeSnippetIds\": [\n \"<string>\"\n ],\n \"availableSkillIds\": [\n \"<string>\"\n ],\n \"subagentsIds\": [\n \"<string>\"\n ],\n \"maxChatMessages\": 123,\n \"maxToolResponseInputTokens\": 123,\n \"contextManagement\": {\n \"fullContextTurnDepth\": 123,\n \"alwaysIncludeUserMessages\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/assistants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Assistant\",\n \"description\": \"<string>\",\n \"presets\": \"<string>\",\n \"model\": \"<string>\",\n \"provider\": \"<string>\",\n \"imgUrl\": \"<string>\",\n \"availableToolsGroupsUids\": [\n \"<string>\"\n ],\n \"enabledTools\": [\n \"<string>\"\n ],\n \"accessConfiguration\": {\n \"externalAccess\": true,\n \"visibilityByRole\": [\n \"<string>\"\n ]\n },\n \"widgetConfiguration\": {\n \"enabled\": true,\n \"sourcesWhiteList\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"welcomeMessage\": \"<string>\"\n },\n \"memoryDocuments\": [\n {}\n ],\n \"structuredOutput\": {},\n \"guardrailsConfiguration\": {\n \"enabled\": true,\n \"guardrails\": {}\n },\n \"codeSnippetIds\": [\n \"<string>\"\n ],\n \"availableSkillIds\": [\n \"<string>\"\n ],\n \"subagentsIds\": [\n \"<string>\"\n ],\n \"maxChatMessages\": 123,\n \"maxToolResponseInputTokens\": 123,\n \"contextManagement\": {\n \"fullContextTurnDepth\": 123,\n \"alwaysIncludeUserMessages\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"identifier": "<string>",
"name": "<string>",
"description": "<string>",
"presets": "<string>",
"model": "<string>",
"provider": "<string>",
"imgUrl": "<string>",
"state": "<string>",
"availableToolsGroupsUids": [
"<string>"
],
"enabledTools": [
"<string>"
],
"accessConfiguration": {},
"widgetConfiguration": {},
"memoryDocuments": [
{}
],
"structuredOutput": {},
"guardrailsConfiguration": {},
"codeSnippetIds": [
"<string>"
],
"availableSkillIds": [
"<string>"
],
"subagentsIds": [
"<string>"
],
"maxChatMessages": 123,
"maxToolResponseInputTokens": 123,
"contextManagement": {
"fullContextTurnDepth": 123,
"alwaysIncludeUserMessages": true
},
"creationTimestampMs": 123,
"lastEditTimestampMs": 123,
"reasoningEffort": "none"
}Authorizations
An API key from your Devic console, sent as Authorization: Bearer <key>. An embedded front end sends a tenant-session token instead, so no API key reaches the browser, and an OAuth integration sends its access token. Missing, invalid or expired credentials get a 401. See Authentication.
Body
application/json
Response
Assistant created successfully