curl --request POST \
--url https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents/{agentId}/unpublish \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents/{agentId}/unpublish', 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/{agentId}/unpublish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents/{agentId}/unpublish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{agentId}/unpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/{agentId}/unpublish")
.header("Authorization", "Bearer <token>")
.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>"
}Unpublish an agent
Remove the published version of the agent; it reverts to a draft. The draft keeps all settings and can be re-published at any time. Published copies of actions and skills are removed along with the published version. Idempotent: unpublishing an unpublished agent is a no-op.
curl --request POST \
--url https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents/{agentId}/unpublish \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents/{agentId}/unpublish', 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/{agentId}/unpublish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{customer-tenant}.nuwacom.ai/api/v1/spaces/{spaceId}/agents/{agentId}/unpublish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{agentId}/unpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/{agentId}/unpublish")
.header("Authorization", "Bearer <token>")
.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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the space the agent belongs to.
2 - 6Unique ID of the agent.
Response
Agent unpublished 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
IDs of the skills attached to the agent (draft state). Resolve them via the Skills API.
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).