Create an agent
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"
}
],
"skillIds": [
"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'
}
],
skillIds: ['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"
}
],
"skillIds": ["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 \"skillIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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'
]
],
'skillIds' => [
'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 \"skillIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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>"
}
],
"skillIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"published": true,
"hasUnpublishedChanges": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Agents
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.
POST
/
api
/
v1
/
spaces
/
{spaceId}
/
agents
Create an agent
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"
}
],
"skillIds": [
"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'
}
],
skillIds: ['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"
}
],
"skillIds": ["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 \"skillIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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'
]
],
'skillIds' => [
'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 \"skillIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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>"
}
],
"skillIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"published": true,
"hasUnpublishedChanges": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Authorizations
Path Parameters
Body
application/json
Model ID used for completions with this agent (e.g. "azure-gpt-4o"). See List all AI models.
KB asset IDs (files uploaded via Upload an asset) attached as agent knowledge.
IDs of skills attached to the agent (manage skills via the Skills API). When an agent has attached skills, only those skills are loaded for it; an agent without attached skills gets none. On update the provided array fully replaces the draft skill set (send [] to detach all). Publish the agent to make skill changes take effect for the Completion API.
Response
Agent created successfully.