Update Assistant
Update an existing assistant.
curl --request PATCH \
--url https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"enabled": true,
"avatar_id": "<string>",
"contact_fields": [
{
"field_id": "<string>"
}
],
"config": {
"instructions": "<string>",
"model": "<string>",
"conversation": {
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_memories": true,
"enable_end_conversation_tool": true,
"enable_transfer_to_human_tool": true,
"routing_instructions": "<string>",
"enable_block_contact_tool": true,
"enable_ai_replies": true,
"enable_auto_resolve": true,
"enable_auto_follow_ups": true,
"follow_up_instructions": "<string>",
"enable_auto_csat": true,
"enable_private_chats": true,
"enable_update_contact_tool": true
},
"widget": {
"mode": "button",
"appearance": "auto",
"position": "right",
"omnibar_minimize_desktop": true,
"hide_powered_by": true,
"enable_dictation": true,
"enable_file_uploads": true,
"colors": {
"accent": "<string>",
"launcher_background": "<string>"
},
"teaser": {
"enabled": true,
"message": "<string>",
"delay_seconds": 60,
"frequency": "once_per_visitor",
"devices": "desktop",
"version": 2
},
"channels": {
"items": [
{
"integration_id": "<string>",
"enabled": true,
"label": "<string>",
"url": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
}
],
"label": "<string>",
"chat_button_label": "<string>"
}
},
"timezone": "<string>"
}
}
'import requests
url = "https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}"
payload = {
"name": "<string>",
"enabled": True,
"avatar_id": "<string>",
"contact_fields": [{ "field_id": "<string>" }],
"config": {
"instructions": "<string>",
"model": "<string>",
"conversation": {
"welcome_banner": "<string>",
"suggested_messages": ["<string>"],
"auto_intro_message": "<string>",
"enable_memories": True,
"enable_end_conversation_tool": True,
"enable_transfer_to_human_tool": True,
"routing_instructions": "<string>",
"enable_block_contact_tool": True,
"enable_ai_replies": True,
"enable_auto_resolve": True,
"enable_auto_follow_ups": True,
"follow_up_instructions": "<string>",
"enable_auto_csat": True,
"enable_private_chats": True,
"enable_update_contact_tool": True
},
"widget": {
"mode": "button",
"appearance": "auto",
"position": "right",
"omnibar_minimize_desktop": True,
"hide_powered_by": True,
"enable_dictation": True,
"enable_file_uploads": True,
"colors": {
"accent": "<string>",
"launcher_background": "<string>"
},
"teaser": {
"enabled": True,
"message": "<string>",
"delay_seconds": 60,
"frequency": "once_per_visitor",
"devices": "desktop",
"version": 2
},
"channels": {
"items": [
{
"integration_id": "<string>",
"enabled": True,
"label": "<string>",
"url": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
}
],
"label": "<string>",
"chat_button_label": "<string>"
}
},
"timezone": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
avatar_id: '<string>',
contact_fields: [{field_id: '<string>'}],
config: {
instructions: '<string>',
model: '<string>',
conversation: {
welcome_banner: '<string>',
suggested_messages: ['<string>'],
auto_intro_message: '<string>',
enable_memories: true,
enable_end_conversation_tool: true,
enable_transfer_to_human_tool: true,
routing_instructions: '<string>',
enable_block_contact_tool: true,
enable_ai_replies: true,
enable_auto_resolve: true,
enable_auto_follow_ups: true,
follow_up_instructions: '<string>',
enable_auto_csat: true,
enable_private_chats: true,
enable_update_contact_tool: true
},
widget: {
mode: 'button',
appearance: 'auto',
position: 'right',
omnibar_minimize_desktop: true,
hide_powered_by: true,
enable_dictation: true,
enable_file_uploads: true,
colors: {accent: '<string>', launcher_background: '<string>'},
teaser: {
enabled: true,
message: '<string>',
delay_seconds: 60,
frequency: 'once_per_visitor',
devices: 'desktop',
version: 2
},
channels: {
items: [
{
integration_id: '<string>',
enabled: true,
label: '<string>',
url: '<string>',
email: 'jsmith@example.com',
phone: '<string>'
}
],
label: '<string>',
chat_button_label: '<string>'
}
},
timezone: '<string>'
}
})
};
fetch('https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}', 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.useinvent.com/orgs/{org_id}/assistants/{assistant_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'enabled' => true,
'avatar_id' => '<string>',
'contact_fields' => [
[
'field_id' => '<string>'
]
],
'config' => [
'instructions' => '<string>',
'model' => '<string>',
'conversation' => [
'welcome_banner' => '<string>',
'suggested_messages' => [
'<string>'
],
'auto_intro_message' => '<string>',
'enable_memories' => true,
'enable_end_conversation_tool' => true,
'enable_transfer_to_human_tool' => true,
'routing_instructions' => '<string>',
'enable_block_contact_tool' => true,
'enable_ai_replies' => true,
'enable_auto_resolve' => true,
'enable_auto_follow_ups' => true,
'follow_up_instructions' => '<string>',
'enable_auto_csat' => true,
'enable_private_chats' => true,
'enable_update_contact_tool' => true
],
'widget' => [
'mode' => 'button',
'appearance' => 'auto',
'position' => 'right',
'omnibar_minimize_desktop' => true,
'hide_powered_by' => true,
'enable_dictation' => true,
'enable_file_uploads' => true,
'colors' => [
'accent' => '<string>',
'launcher_background' => '<string>'
],
'teaser' => [
'enabled' => true,
'message' => '<string>',
'delay_seconds' => 60,
'frequency' => 'once_per_visitor',
'devices' => 'desktop',
'version' => 2
],
'channels' => [
'items' => [
[
'integration_id' => '<string>',
'enabled' => true,
'label' => '<string>',
'url' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>'
]
],
'label' => '<string>',
'chat_button_label' => '<string>'
]
],
'timezone' => '<string>'
]
]),
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.useinvent.com/orgs/{org_id}/assistants/{assistant_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"avatar_id\": \"<string>\",\n \"contact_fields\": [\n {\n \"field_id\": \"<string>\"\n }\n ],\n \"config\": {\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"conversation\": {\n \"welcome_banner\": \"<string>\",\n \"suggested_messages\": [\n \"<string>\"\n ],\n \"auto_intro_message\": \"<string>\",\n \"enable_memories\": true,\n \"enable_end_conversation_tool\": true,\n \"enable_transfer_to_human_tool\": true,\n \"routing_instructions\": \"<string>\",\n \"enable_block_contact_tool\": true,\n \"enable_ai_replies\": true,\n \"enable_auto_resolve\": true,\n \"enable_auto_follow_ups\": true,\n \"follow_up_instructions\": \"<string>\",\n \"enable_auto_csat\": true,\n \"enable_private_chats\": true,\n \"enable_update_contact_tool\": true\n },\n \"widget\": {\n \"mode\": \"button\",\n \"appearance\": \"auto\",\n \"position\": \"right\",\n \"omnibar_minimize_desktop\": true,\n \"hide_powered_by\": true,\n \"enable_dictation\": true,\n \"enable_file_uploads\": true,\n \"colors\": {\n \"accent\": \"<string>\",\n \"launcher_background\": \"<string>\"\n },\n \"teaser\": {\n \"enabled\": true,\n \"message\": \"<string>\",\n \"delay_seconds\": 60,\n \"frequency\": \"once_per_visitor\",\n \"devices\": \"desktop\",\n \"version\": 2\n },\n \"channels\": {\n \"items\": [\n {\n \"integration_id\": \"<string>\",\n \"enabled\": true,\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n }\n ],\n \"label\": \"<string>\",\n \"chat_button_label\": \"<string>\"\n }\n },\n \"timezone\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"avatar_id\": \"<string>\",\n \"contact_fields\": [\n {\n \"field_id\": \"<string>\"\n }\n ],\n \"config\": {\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"conversation\": {\n \"welcome_banner\": \"<string>\",\n \"suggested_messages\": [\n \"<string>\"\n ],\n \"auto_intro_message\": \"<string>\",\n \"enable_memories\": true,\n \"enable_end_conversation_tool\": true,\n \"enable_transfer_to_human_tool\": true,\n \"routing_instructions\": \"<string>\",\n \"enable_block_contact_tool\": true,\n \"enable_ai_replies\": true,\n \"enable_auto_resolve\": true,\n \"enable_auto_follow_ups\": true,\n \"follow_up_instructions\": \"<string>\",\n \"enable_auto_csat\": true,\n \"enable_private_chats\": true,\n \"enable_update_contact_tool\": true\n },\n \"widget\": {\n \"mode\": \"button\",\n \"appearance\": \"auto\",\n \"position\": \"right\",\n \"omnibar_minimize_desktop\": true,\n \"hide_powered_by\": true,\n \"enable_dictation\": true,\n \"enable_file_uploads\": true,\n \"colors\": {\n \"accent\": \"<string>\",\n \"launcher_background\": \"<string>\"\n },\n \"teaser\": {\n \"enabled\": true,\n \"message\": \"<string>\",\n \"delay_seconds\": 60,\n \"frequency\": \"once_per_visitor\",\n \"devices\": \"desktop\",\n \"version\": 2\n },\n \"channels\": {\n \"items\": [\n {\n \"integration_id\": \"<string>\",\n \"enabled\": true,\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n }\n ],\n \"label\": \"<string>\",\n \"chat_button_label\": \"<string>\"\n }\n },\n \"timezone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"avatar_id\": \"<string>\",\n \"contact_fields\": [\n {\n \"field_id\": \"<string>\"\n }\n ],\n \"config\": {\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"conversation\": {\n \"welcome_banner\": \"<string>\",\n \"suggested_messages\": [\n \"<string>\"\n ],\n \"auto_intro_message\": \"<string>\",\n \"enable_memories\": true,\n \"enable_end_conversation_tool\": true,\n \"enable_transfer_to_human_tool\": true,\n \"routing_instructions\": \"<string>\",\n \"enable_block_contact_tool\": true,\n \"enable_ai_replies\": true,\n \"enable_auto_resolve\": true,\n \"enable_auto_follow_ups\": true,\n \"follow_up_instructions\": \"<string>\",\n \"enable_auto_csat\": true,\n \"enable_private_chats\": true,\n \"enable_update_contact_tool\": true\n },\n \"widget\": {\n \"mode\": \"button\",\n \"appearance\": \"auto\",\n \"position\": \"right\",\n \"omnibar_minimize_desktop\": true,\n \"hide_powered_by\": true,\n \"enable_dictation\": true,\n \"enable_file_uploads\": true,\n \"colors\": {\n \"accent\": \"<string>\",\n \"launcher_background\": \"<string>\"\n },\n \"teaser\": {\n \"enabled\": true,\n \"message\": \"<string>\",\n \"delay_seconds\": 60,\n \"frequency\": \"once_per_visitor\",\n \"devices\": \"desktop\",\n \"version\": 2\n },\n \"channels\": {\n \"items\": [\n {\n \"integration_id\": \"<string>\",\n \"enabled\": true,\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n }\n ],\n \"label\": \"<string>\",\n \"chat_button_label\": \"<string>\"\n }\n },\n \"timezone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"enabled": true,
"deleted": true,
"secret_key": "<string>",
"avatar_url": "<string>",
"config": {
"language": "auto",
"model": "<string>",
"stt": {
"model": "<string>"
},
"tts": {
"model": "<string>",
"voice_id": "<string>"
},
"conversation": {
"thread_mode": "new",
"enable_memories": true,
"enable_transfer_to_human_tool": true,
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_end_conversation_tool": true,
"routing_instructions": "<string>",
"enable_block_contact_tool": true,
"enable_ai_replies": true,
"enable_auto_resolve": true,
"enable_auto_follow_ups": true,
"follow_up_instructions": "<string>",
"enable_auto_csat": true,
"enable_private_chats": true,
"enable_update_contact_tool": true
},
"knowledge_scope": "all",
"timezone": "<string>",
"instructions": "<string>",
"widget": {}
},
"integrations": [
{
"id": "<string>",
"enabled": true,
"integration_id": "internal",
"assistant_id": "<string>",
"connection_id": "<string>",
"config": {},
"error": "<string>",
"platform_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"actions": [
{
"id": "<string>",
"enabled": true,
"name": "<string>",
"instructions": "<string>",
"action_id": "TOOLS:HTTP_REQUEST",
"assistant_id": "ast_XXX",
"connection_id": "con_XXX",
"config": {
"input": {},
"definitions": [
{
"path": "<string>",
"definition": {}
}
]
},
"approval_mode": "auto",
"position": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"contact_fields": [
{
"mode": "none",
"field": {
"id": "<string>",
"table_id": "<string>",
"key": "<string>",
"type": "id",
"schema": {
"type": "file",
"name": "<string>",
"description": "<string>",
"optional": true,
"array": true,
"placeholder": "<string>",
"display": {
"field": "inline",
"container": "grid",
"empty": "show",
"render": "button"
},
"order": 1,
"link": "<string>",
"metadata": {},
"allowed_modes": [
"all"
],
"broadcast_field": true,
"broadcast_exposed": true,
"integration_field": true,
"display_field": true,
"conditions": [
{
"field": "<string>",
"operator": "eq",
"value": "<unknown>"
}
],
"hidden": true,
"picker": {
"type": "google_drive",
"views": [
"DOCS"
],
"selectable_mime_types": [
"<string>"
]
},
"requires": [
"<string>"
],
"disable_variables": true,
"allowed_types": [
"<string>"
],
"visibility": "PRIVATE",
"default": {
"id": "<string>",
"file_path": "<string>",
"file_filename": "document.pdf",
"file_size": 1024,
"file_mimetype": "application/pdf",
"file_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"readonly": true,
"sortable": true,
"groupable_in": [
"table"
],
"kind": "system"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"members": [
{
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatar": "<string>",
"role": "ADMIN",
"status": "ACTIVE",
"description": "<string>",
"org_id": "<string>",
"user_id": "<string>",
"preferences": {
"notifications": {
"assigned_to_me": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"billing": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
}
}
},
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": "red",
"permissions": [
"org:write"
]
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z"
}
],
"members_count": 123
}Authorizations
Bearer token authentication using your API key
Path Parameters
The ID of the org
The ID of the assistant
Body
The assistant information to update.
Schema for updating an existing assistant
The name of the assistant
1 - 1024Whether the assistant is enabled
The ID of the avatar file id
32Show child attributes
Show child attributes
Schema for updating the configuration of an assistant
Show child attributes
Show child attributes
Response
The updated assistant.
Schema for an assistant
The name of the assistant
Whether the assistant is enabled
Whether the assistant has been soft-deleted
The secret key to create session hashes
The URL of the avatar photo
Schema for the configuration of an assistant
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Bounded preview of assigned members (list reads only) for the collage
Show child attributes
Show child attributes
Total number of assigned members (list reads only)
Was this page helpful?
curl --request PATCH \
--url https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"enabled": true,
"avatar_id": "<string>",
"contact_fields": [
{
"field_id": "<string>"
}
],
"config": {
"instructions": "<string>",
"model": "<string>",
"conversation": {
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_memories": true,
"enable_end_conversation_tool": true,
"enable_transfer_to_human_tool": true,
"routing_instructions": "<string>",
"enable_block_contact_tool": true,
"enable_ai_replies": true,
"enable_auto_resolve": true,
"enable_auto_follow_ups": true,
"follow_up_instructions": "<string>",
"enable_auto_csat": true,
"enable_private_chats": true,
"enable_update_contact_tool": true
},
"widget": {
"mode": "button",
"appearance": "auto",
"position": "right",
"omnibar_minimize_desktop": true,
"hide_powered_by": true,
"enable_dictation": true,
"enable_file_uploads": true,
"colors": {
"accent": "<string>",
"launcher_background": "<string>"
},
"teaser": {
"enabled": true,
"message": "<string>",
"delay_seconds": 60,
"frequency": "once_per_visitor",
"devices": "desktop",
"version": 2
},
"channels": {
"items": [
{
"integration_id": "<string>",
"enabled": true,
"label": "<string>",
"url": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
}
],
"label": "<string>",
"chat_button_label": "<string>"
}
},
"timezone": "<string>"
}
}
'import requests
url = "https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}"
payload = {
"name": "<string>",
"enabled": True,
"avatar_id": "<string>",
"contact_fields": [{ "field_id": "<string>" }],
"config": {
"instructions": "<string>",
"model": "<string>",
"conversation": {
"welcome_banner": "<string>",
"suggested_messages": ["<string>"],
"auto_intro_message": "<string>",
"enable_memories": True,
"enable_end_conversation_tool": True,
"enable_transfer_to_human_tool": True,
"routing_instructions": "<string>",
"enable_block_contact_tool": True,
"enable_ai_replies": True,
"enable_auto_resolve": True,
"enable_auto_follow_ups": True,
"follow_up_instructions": "<string>",
"enable_auto_csat": True,
"enable_private_chats": True,
"enable_update_contact_tool": True
},
"widget": {
"mode": "button",
"appearance": "auto",
"position": "right",
"omnibar_minimize_desktop": True,
"hide_powered_by": True,
"enable_dictation": True,
"enable_file_uploads": True,
"colors": {
"accent": "<string>",
"launcher_background": "<string>"
},
"teaser": {
"enabled": True,
"message": "<string>",
"delay_seconds": 60,
"frequency": "once_per_visitor",
"devices": "desktop",
"version": 2
},
"channels": {
"items": [
{
"integration_id": "<string>",
"enabled": True,
"label": "<string>",
"url": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
}
],
"label": "<string>",
"chat_button_label": "<string>"
}
},
"timezone": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
avatar_id: '<string>',
contact_fields: [{field_id: '<string>'}],
config: {
instructions: '<string>',
model: '<string>',
conversation: {
welcome_banner: '<string>',
suggested_messages: ['<string>'],
auto_intro_message: '<string>',
enable_memories: true,
enable_end_conversation_tool: true,
enable_transfer_to_human_tool: true,
routing_instructions: '<string>',
enable_block_contact_tool: true,
enable_ai_replies: true,
enable_auto_resolve: true,
enable_auto_follow_ups: true,
follow_up_instructions: '<string>',
enable_auto_csat: true,
enable_private_chats: true,
enable_update_contact_tool: true
},
widget: {
mode: 'button',
appearance: 'auto',
position: 'right',
omnibar_minimize_desktop: true,
hide_powered_by: true,
enable_dictation: true,
enable_file_uploads: true,
colors: {accent: '<string>', launcher_background: '<string>'},
teaser: {
enabled: true,
message: '<string>',
delay_seconds: 60,
frequency: 'once_per_visitor',
devices: 'desktop',
version: 2
},
channels: {
items: [
{
integration_id: '<string>',
enabled: true,
label: '<string>',
url: '<string>',
email: 'jsmith@example.com',
phone: '<string>'
}
],
label: '<string>',
chat_button_label: '<string>'
}
},
timezone: '<string>'
}
})
};
fetch('https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}', 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.useinvent.com/orgs/{org_id}/assistants/{assistant_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'enabled' => true,
'avatar_id' => '<string>',
'contact_fields' => [
[
'field_id' => '<string>'
]
],
'config' => [
'instructions' => '<string>',
'model' => '<string>',
'conversation' => [
'welcome_banner' => '<string>',
'suggested_messages' => [
'<string>'
],
'auto_intro_message' => '<string>',
'enable_memories' => true,
'enable_end_conversation_tool' => true,
'enable_transfer_to_human_tool' => true,
'routing_instructions' => '<string>',
'enable_block_contact_tool' => true,
'enable_ai_replies' => true,
'enable_auto_resolve' => true,
'enable_auto_follow_ups' => true,
'follow_up_instructions' => '<string>',
'enable_auto_csat' => true,
'enable_private_chats' => true,
'enable_update_contact_tool' => true
],
'widget' => [
'mode' => 'button',
'appearance' => 'auto',
'position' => 'right',
'omnibar_minimize_desktop' => true,
'hide_powered_by' => true,
'enable_dictation' => true,
'enable_file_uploads' => true,
'colors' => [
'accent' => '<string>',
'launcher_background' => '<string>'
],
'teaser' => [
'enabled' => true,
'message' => '<string>',
'delay_seconds' => 60,
'frequency' => 'once_per_visitor',
'devices' => 'desktop',
'version' => 2
],
'channels' => [
'items' => [
[
'integration_id' => '<string>',
'enabled' => true,
'label' => '<string>',
'url' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>'
]
],
'label' => '<string>',
'chat_button_label' => '<string>'
]
],
'timezone' => '<string>'
]
]),
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.useinvent.com/orgs/{org_id}/assistants/{assistant_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"avatar_id\": \"<string>\",\n \"contact_fields\": [\n {\n \"field_id\": \"<string>\"\n }\n ],\n \"config\": {\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"conversation\": {\n \"welcome_banner\": \"<string>\",\n \"suggested_messages\": [\n \"<string>\"\n ],\n \"auto_intro_message\": \"<string>\",\n \"enable_memories\": true,\n \"enable_end_conversation_tool\": true,\n \"enable_transfer_to_human_tool\": true,\n \"routing_instructions\": \"<string>\",\n \"enable_block_contact_tool\": true,\n \"enable_ai_replies\": true,\n \"enable_auto_resolve\": true,\n \"enable_auto_follow_ups\": true,\n \"follow_up_instructions\": \"<string>\",\n \"enable_auto_csat\": true,\n \"enable_private_chats\": true,\n \"enable_update_contact_tool\": true\n },\n \"widget\": {\n \"mode\": \"button\",\n \"appearance\": \"auto\",\n \"position\": \"right\",\n \"omnibar_minimize_desktop\": true,\n \"hide_powered_by\": true,\n \"enable_dictation\": true,\n \"enable_file_uploads\": true,\n \"colors\": {\n \"accent\": \"<string>\",\n \"launcher_background\": \"<string>\"\n },\n \"teaser\": {\n \"enabled\": true,\n \"message\": \"<string>\",\n \"delay_seconds\": 60,\n \"frequency\": \"once_per_visitor\",\n \"devices\": \"desktop\",\n \"version\": 2\n },\n \"channels\": {\n \"items\": [\n {\n \"integration_id\": \"<string>\",\n \"enabled\": true,\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n }\n ],\n \"label\": \"<string>\",\n \"chat_button_label\": \"<string>\"\n }\n },\n \"timezone\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"avatar_id\": \"<string>\",\n \"contact_fields\": [\n {\n \"field_id\": \"<string>\"\n }\n ],\n \"config\": {\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"conversation\": {\n \"welcome_banner\": \"<string>\",\n \"suggested_messages\": [\n \"<string>\"\n ],\n \"auto_intro_message\": \"<string>\",\n \"enable_memories\": true,\n \"enable_end_conversation_tool\": true,\n \"enable_transfer_to_human_tool\": true,\n \"routing_instructions\": \"<string>\",\n \"enable_block_contact_tool\": true,\n \"enable_ai_replies\": true,\n \"enable_auto_resolve\": true,\n \"enable_auto_follow_ups\": true,\n \"follow_up_instructions\": \"<string>\",\n \"enable_auto_csat\": true,\n \"enable_private_chats\": true,\n \"enable_update_contact_tool\": true\n },\n \"widget\": {\n \"mode\": \"button\",\n \"appearance\": \"auto\",\n \"position\": \"right\",\n \"omnibar_minimize_desktop\": true,\n \"hide_powered_by\": true,\n \"enable_dictation\": true,\n \"enable_file_uploads\": true,\n \"colors\": {\n \"accent\": \"<string>\",\n \"launcher_background\": \"<string>\"\n },\n \"teaser\": {\n \"enabled\": true,\n \"message\": \"<string>\",\n \"delay_seconds\": 60,\n \"frequency\": \"once_per_visitor\",\n \"devices\": \"desktop\",\n \"version\": 2\n },\n \"channels\": {\n \"items\": [\n {\n \"integration_id\": \"<string>\",\n \"enabled\": true,\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n }\n ],\n \"label\": \"<string>\",\n \"chat_button_label\": \"<string>\"\n }\n },\n \"timezone\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"avatar_id\": \"<string>\",\n \"contact_fields\": [\n {\n \"field_id\": \"<string>\"\n }\n ],\n \"config\": {\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"conversation\": {\n \"welcome_banner\": \"<string>\",\n \"suggested_messages\": [\n \"<string>\"\n ],\n \"auto_intro_message\": \"<string>\",\n \"enable_memories\": true,\n \"enable_end_conversation_tool\": true,\n \"enable_transfer_to_human_tool\": true,\n \"routing_instructions\": \"<string>\",\n \"enable_block_contact_tool\": true,\n \"enable_ai_replies\": true,\n \"enable_auto_resolve\": true,\n \"enable_auto_follow_ups\": true,\n \"follow_up_instructions\": \"<string>\",\n \"enable_auto_csat\": true,\n \"enable_private_chats\": true,\n \"enable_update_contact_tool\": true\n },\n \"widget\": {\n \"mode\": \"button\",\n \"appearance\": \"auto\",\n \"position\": \"right\",\n \"omnibar_minimize_desktop\": true,\n \"hide_powered_by\": true,\n \"enable_dictation\": true,\n \"enable_file_uploads\": true,\n \"colors\": {\n \"accent\": \"<string>\",\n \"launcher_background\": \"<string>\"\n },\n \"teaser\": {\n \"enabled\": true,\n \"message\": \"<string>\",\n \"delay_seconds\": 60,\n \"frequency\": \"once_per_visitor\",\n \"devices\": \"desktop\",\n \"version\": 2\n },\n \"channels\": {\n \"items\": [\n {\n \"integration_id\": \"<string>\",\n \"enabled\": true,\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n }\n ],\n \"label\": \"<string>\",\n \"chat_button_label\": \"<string>\"\n }\n },\n \"timezone\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"enabled": true,
"deleted": true,
"secret_key": "<string>",
"avatar_url": "<string>",
"config": {
"language": "auto",
"model": "<string>",
"stt": {
"model": "<string>"
},
"tts": {
"model": "<string>",
"voice_id": "<string>"
},
"conversation": {
"thread_mode": "new",
"enable_memories": true,
"enable_transfer_to_human_tool": true,
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_end_conversation_tool": true,
"routing_instructions": "<string>",
"enable_block_contact_tool": true,
"enable_ai_replies": true,
"enable_auto_resolve": true,
"enable_auto_follow_ups": true,
"follow_up_instructions": "<string>",
"enable_auto_csat": true,
"enable_private_chats": true,
"enable_update_contact_tool": true
},
"knowledge_scope": "all",
"timezone": "<string>",
"instructions": "<string>",
"widget": {}
},
"integrations": [
{
"id": "<string>",
"enabled": true,
"integration_id": "internal",
"assistant_id": "<string>",
"connection_id": "<string>",
"config": {},
"error": "<string>",
"platform_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"actions": [
{
"id": "<string>",
"enabled": true,
"name": "<string>",
"instructions": "<string>",
"action_id": "TOOLS:HTTP_REQUEST",
"assistant_id": "ast_XXX",
"connection_id": "con_XXX",
"config": {
"input": {},
"definitions": [
{
"path": "<string>",
"definition": {}
}
]
},
"approval_mode": "auto",
"position": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"contact_fields": [
{
"mode": "none",
"field": {
"id": "<string>",
"table_id": "<string>",
"key": "<string>",
"type": "id",
"schema": {
"type": "file",
"name": "<string>",
"description": "<string>",
"optional": true,
"array": true,
"placeholder": "<string>",
"display": {
"field": "inline",
"container": "grid",
"empty": "show",
"render": "button"
},
"order": 1,
"link": "<string>",
"metadata": {},
"allowed_modes": [
"all"
],
"broadcast_field": true,
"broadcast_exposed": true,
"integration_field": true,
"display_field": true,
"conditions": [
{
"field": "<string>",
"operator": "eq",
"value": "<unknown>"
}
],
"hidden": true,
"picker": {
"type": "google_drive",
"views": [
"DOCS"
],
"selectable_mime_types": [
"<string>"
]
},
"requires": [
"<string>"
],
"disable_variables": true,
"allowed_types": [
"<string>"
],
"visibility": "PRIVATE",
"default": {
"id": "<string>",
"file_path": "<string>",
"file_filename": "document.pdf",
"file_size": 1024,
"file_mimetype": "application/pdf",
"file_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"readonly": true,
"sortable": true,
"groupable_in": [
"table"
],
"kind": "system"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"members": [
{
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatar": "<string>",
"role": "ADMIN",
"status": "ACTIVE",
"description": "<string>",
"org_id": "<string>",
"user_id": "<string>",
"preferences": {
"notifications": {
"assigned_to_me": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"billing": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
}
}
},
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": "red",
"permissions": [
"org:write"
]
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z"
}
],
"members_count": 123
}