curl --request POST \
--url https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"systemInstruction": "<string>",
"conversationStarters": [
{
"text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"type": "text"
}
],
"model": "<string>",
"temperature": 123,
"attachmentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"folderIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"allowUploads": true,
"allowUrls": true,
"enableFollowUpMessages": true,
"categoryId": 123,
"voiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appEnabled": true,
"embedEnabled": true,
"embedOptions": {
"domainWhitelist": [
"<string>"
],
"showSources": true,
"allowVoiceInput": true,
"allowFileUpload": true,
"lightTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
},
"darkTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
}
},
"actions": [
{
"integration": "<string>",
"key": "<string>",
"requiresConfirmation": true,
"defaultValues": {},
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcpClientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
systemInstruction: '<string>',
conversationStarters: [
{
text: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
type: 'text'
}
],
model: '<string>',
temperature: 123,
attachmentIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
folderIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
contentIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
allowUploads: true,
allowUrls: true,
enableFollowUpMessages: true,
categoryId: 123,
voiceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
appEnabled: true,
embedEnabled: true,
embedOptions: {
domainWhitelist: ['<string>'],
showSources: true,
allowVoiceInput: true,
allowFileUpload: true,
lightTheme: {
backgroundColor: {h: 123, s: 123, v: 123, a: 123},
primaryColor: {h: 123, s: 123, v: 123, a: 123}
},
darkTheme: {
backgroundColor: {h: 123, s: 123, v: 123, a: 123},
primaryColor: {h: 123, s: 123, v: 123, a: 123}
}
},
actions: [
{
integration: '<string>',
key: '<string>',
requiresConfirmation: true,
defaultValues: {},
integrationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mcpClientId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents"
payload = {
"name": "<string>",
"description": "<string>",
"systemInstruction": "<string>",
"conversationStarters": [
{
"text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"type": "text"
}
],
"model": "<string>",
"temperature": 123,
"attachmentIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"folderIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"contentIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"allowUploads": True,
"allowUrls": True,
"enableFollowUpMessages": True,
"categoryId": 123,
"voiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appEnabled": True,
"embedEnabled": True,
"embedOptions": {
"domainWhitelist": ["<string>"],
"showSources": True,
"allowVoiceInput": True,
"allowFileUpload": True,
"lightTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
},
"darkTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
}
},
"actions": [
{
"integration": "<string>",
"key": "<string>",
"requiresConfirmation": True,
"defaultValues": {},
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcpClientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"systemInstruction\": \"<string>\",\n \"conversationStarters\": [\n {\n \"text\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"type\": \"text\"\n }\n ],\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"attachmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"folderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"allowUploads\": true,\n \"allowUrls\": true,\n \"enableFollowUpMessages\": true,\n \"categoryId\": 123,\n \"voiceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"appEnabled\": true,\n \"embedEnabled\": true,\n \"embedOptions\": {\n \"domainWhitelist\": [\n \"<string>\"\n ],\n \"showSources\": true,\n \"allowVoiceInput\": true,\n \"allowFileUpload\": true,\n \"lightTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n },\n \"darkTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n }\n },\n \"actions\": [\n {\n \"integration\": \"<string>\",\n \"key\": \"<string>\",\n \"requiresConfirmation\": true,\n \"defaultValues\": {},\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mcpClientId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents",
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' => '<string>',
'description' => '<string>',
'systemInstruction' => '<string>',
'conversationStarters' => [
[
'text' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'type' => 'text'
]
],
'model' => '<string>',
'temperature' => 123,
'attachmentIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'folderIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'contentIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'allowUploads' => true,
'allowUrls' => true,
'enableFollowUpMessages' => true,
'categoryId' => 123,
'voiceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'appEnabled' => true,
'embedEnabled' => true,
'embedOptions' => [
'domainWhitelist' => [
'<string>'
],
'showSources' => true,
'allowVoiceInput' => true,
'allowFileUpload' => true,
'lightTheme' => [
'backgroundColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
],
'primaryColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
]
],
'darkTheme' => [
'backgroundColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
],
'primaryColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
]
]
],
'actions' => [
[
'integration' => '<string>',
'key' => '<string>',
'requiresConfirmation' => true,
'defaultValues' => [
],
'integrationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'mcpClientId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"systemInstruction\": \"<string>\",\n \"conversationStarters\": [\n {\n \"text\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"type\": \"text\"\n }\n ],\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"attachmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"folderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"allowUploads\": true,\n \"allowUrls\": true,\n \"enableFollowUpMessages\": true,\n \"categoryId\": 123,\n \"voiceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"appEnabled\": true,\n \"embedEnabled\": true,\n \"embedOptions\": {\n \"domainWhitelist\": [\n \"<string>\"\n ],\n \"showSources\": true,\n \"allowVoiceInput\": true,\n \"allowFileUpload\": true,\n \"lightTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n },\n \"darkTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n }\n },\n \"actions\": [\n {\n \"integration\": \"<string>\",\n \"key\": \"<string>\",\n \"requiresConfirmation\": true,\n \"defaultValues\": {},\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mcpClientId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spaceId": "<string>",
"name": "<string>",
"description": "<string>",
"systemInstruction": "<string>",
"conversationStarters": [
{
"text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"type": "text"
}
],
"welcomeMessage": {},
"model": "<string>",
"temperature": 123,
"attachmentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"folderIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"allowUploads": true,
"allowUrls": true,
"enableFollowUpMessages": true,
"categoryId": 123,
"voiceId": "<string>",
"appEnabled": true,
"embedEnabled": true,
"embedId": "<string>",
"embedOptions": {
"domainWhitelist": [
"<string>"
],
"showSources": true,
"allowVoiceInput": true,
"allowFileUpload": true,
"themeMode": "dark",
"lightTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
},
"darkTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
}
},
"actions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integration": "<string>",
"key": "<string>",
"requiresConfirmation": true,
"defaultValues": {},
"integrationId": "<string>",
"mcpClientId": "<string>"
}
],
"isSystemAgent": true,
"published": true,
"hasUnpublishedChanges": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Create an agent
Create a new agent in a space. The agent starts as an unpublished draft (published: false); publish it in the app to share it with the space.
curl --request POST \
--url https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"systemInstruction": "<string>",
"conversationStarters": [
{
"text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"type": "text"
}
],
"model": "<string>",
"temperature": 123,
"attachmentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"folderIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"allowUploads": true,
"allowUrls": true,
"enableFollowUpMessages": true,
"categoryId": 123,
"voiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appEnabled": true,
"embedEnabled": true,
"embedOptions": {
"domainWhitelist": [
"<string>"
],
"showSources": true,
"allowVoiceInput": true,
"allowFileUpload": true,
"lightTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
},
"darkTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
}
},
"actions": [
{
"integration": "<string>",
"key": "<string>",
"requiresConfirmation": true,
"defaultValues": {},
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcpClientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
systemInstruction: '<string>',
conversationStarters: [
{
text: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
type: 'text'
}
],
model: '<string>',
temperature: 123,
attachmentIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
folderIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
contentIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
allowUploads: true,
allowUrls: true,
enableFollowUpMessages: true,
categoryId: 123,
voiceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
appEnabled: true,
embedEnabled: true,
embedOptions: {
domainWhitelist: ['<string>'],
showSources: true,
allowVoiceInput: true,
allowFileUpload: true,
lightTheme: {
backgroundColor: {h: 123, s: 123, v: 123, a: 123},
primaryColor: {h: 123, s: 123, v: 123, a: 123}
},
darkTheme: {
backgroundColor: {h: 123, s: 123, v: 123, a: 123},
primaryColor: {h: 123, s: 123, v: 123, a: 123}
}
},
actions: [
{
integration: '<string>',
key: '<string>',
requiresConfirmation: true,
defaultValues: {},
integrationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mcpClientId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents"
payload = {
"name": "<string>",
"description": "<string>",
"systemInstruction": "<string>",
"conversationStarters": [
{
"text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"type": "text"
}
],
"model": "<string>",
"temperature": 123,
"attachmentIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"folderIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"contentIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"allowUploads": True,
"allowUrls": True,
"enableFollowUpMessages": True,
"categoryId": 123,
"voiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appEnabled": True,
"embedEnabled": True,
"embedOptions": {
"domainWhitelist": ["<string>"],
"showSources": True,
"allowVoiceInput": True,
"allowFileUpload": True,
"lightTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
},
"darkTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
}
},
"actions": [
{
"integration": "<string>",
"key": "<string>",
"requiresConfirmation": True,
"defaultValues": {},
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcpClientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"systemInstruction\": \"<string>\",\n \"conversationStarters\": [\n {\n \"text\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"type\": \"text\"\n }\n ],\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"attachmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"folderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"allowUploads\": true,\n \"allowUrls\": true,\n \"enableFollowUpMessages\": true,\n \"categoryId\": 123,\n \"voiceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"appEnabled\": true,\n \"embedEnabled\": true,\n \"embedOptions\": {\n \"domainWhitelist\": [\n \"<string>\"\n ],\n \"showSources\": true,\n \"allowVoiceInput\": true,\n \"allowFileUpload\": true,\n \"lightTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n },\n \"darkTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n }\n },\n \"actions\": [\n {\n \"integration\": \"<string>\",\n \"key\": \"<string>\",\n \"requiresConfirmation\": true,\n \"defaultValues\": {},\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mcpClientId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents",
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' => '<string>',
'description' => '<string>',
'systemInstruction' => '<string>',
'conversationStarters' => [
[
'text' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'type' => 'text'
]
],
'model' => '<string>',
'temperature' => 123,
'attachmentIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'folderIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'contentIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'allowUploads' => true,
'allowUrls' => true,
'enableFollowUpMessages' => true,
'categoryId' => 123,
'voiceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'appEnabled' => true,
'embedEnabled' => true,
'embedOptions' => [
'domainWhitelist' => [
'<string>'
],
'showSources' => true,
'allowVoiceInput' => true,
'allowFileUpload' => true,
'lightTheme' => [
'backgroundColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
],
'primaryColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
]
],
'darkTheme' => [
'backgroundColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
],
'primaryColor' => [
'h' => 123,
's' => 123,
'v' => 123,
'a' => 123
]
]
],
'actions' => [
[
'integration' => '<string>',
'key' => '<string>',
'requiresConfirmation' => true,
'defaultValues' => [
],
'integrationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'mcpClientId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"systemInstruction\": \"<string>\",\n \"conversationStarters\": [\n {\n \"text\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"type\": \"text\"\n }\n ],\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"attachmentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"folderIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contentIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"allowUploads\": true,\n \"allowUrls\": true,\n \"enableFollowUpMessages\": true,\n \"categoryId\": 123,\n \"voiceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"appEnabled\": true,\n \"embedEnabled\": true,\n \"embedOptions\": {\n \"domainWhitelist\": [\n \"<string>\"\n ],\n \"showSources\": true,\n \"allowVoiceInput\": true,\n \"allowFileUpload\": true,\n \"lightTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n },\n \"darkTheme\": {\n \"backgroundColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n },\n \"primaryColor\": {\n \"h\": 123,\n \"s\": 123,\n \"v\": 123,\n \"a\": 123\n }\n }\n },\n \"actions\": [\n {\n \"integration\": \"<string>\",\n \"key\": \"<string>\",\n \"requiresConfirmation\": true,\n \"defaultValues\": {},\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mcpClientId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spaceId": "<string>",
"name": "<string>",
"description": "<string>",
"systemInstruction": "<string>",
"conversationStarters": [
{
"text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"type": "text"
}
],
"welcomeMessage": {},
"model": "<string>",
"temperature": 123,
"attachmentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"folderIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contentIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"allowUploads": true,
"allowUrls": true,
"enableFollowUpMessages": true,
"categoryId": 123,
"voiceId": "<string>",
"appEnabled": true,
"embedEnabled": true,
"embedId": "<string>",
"embedOptions": {
"domainWhitelist": [
"<string>"
],
"showSources": true,
"allowVoiceInput": true,
"allowFileUpload": true,
"themeMode": "dark",
"lightTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
},
"darkTheme": {
"backgroundColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
},
"primaryColor": {
"h": 123,
"s": 123,
"v": 123,
"a": 123
}
}
},
"actions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integration": "<string>",
"key": "<string>",
"requiresConfirmation": true,
"defaultValues": {},
"integrationId": "<string>",
"mcpClientId": "<string>"
}
],
"isSystemAgent": true,
"published": true,
"hasUnpublishedChanges": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the space the agents belong to.
2 - 6Body
Display name of the agent.
1Short description of what the agent does.
System prompt / instructions that define the agent's behavior.
Suggested prompts shown to users when starting a chat with the agent.
Show child attributes
Show child attributes
Welcome message shown when a chat with the agent starts, keyed by locale (e.g. { "text": { "en-US": "Hi!" } }).
Show child attributes
Show child attributes
Model ID used for completions with this agent (e.g. "azure-gpt-4o"). See List all AI models.
Sampling temperature applied to completions with this agent.
KB asset IDs (files uploaded via Upload an asset) attached as agent knowledge.
Knowledge folder IDs whose contents the agent can search.
nuwacom document/content IDs attached as agent knowledge.
Whether users may attach file uploads when chatting with the agent.
Whether users may attach URLs when chatting with the agent.
Whether the agent suggests follow-up messages after each response.
ID of the library category the agent is assigned to.
ID of the tone-of-voice profile applied to the agent.
Whether the agent is available inside the nuwacom app. Defaults to true.
Whether the agent is published as an external, embeddable chat widget. When enabling this, set embedOptions.domainWhitelist before publishing (publishing an embed-enabled agent without an allowlist is rejected). Defaults to false.
External embed widget options (allowed domains, theme, upload/voice toggles, source display). On update the provided object fully replaces the current embed options.
Show child attributes
Show child attributes
Actions/tools the agent can use. On update the provided array fully replaces the agent's current draft actions (send [] to remove all). Publish the agent to make action changes take effect for the Completion API.
Show child attributes
Show child attributes
Response
Agent created successfully.
Unique ID of the agent. Use it with the Completion API (agentId option) to chat with the agent.
ID of the space the agent belongs to.
2 - 6Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether the agent is published as an external, embeddable chat widget.
Identifier used to embed the agent as an external widget.
External embed widget options (draft state).
Show child attributes
Show child attributes
Actions/tools configured on the agent (draft state).
Show child attributes
Show child attributes
true for built-in nuwacom system agents (cannot be updated or deleted).
Whether a published version of the agent exists. Publishing happens in the nuwacom app.
true when the draft differs from the published version (or nothing has been published yet).