Update Chat Skills
Replace the set of skills enabled in an org chat.
curl --request PUT \
--url https://api.useinvent.com/chats/{chat_id}/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"skill_ids": [
"<string>"
]
}
'import requests
url = "https://api.useinvent.com/chats/{chat_id}/skills"
payload = { "skill_ids": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({skill_ids: ['<string>']})
};
fetch('https://api.useinvent.com/chats/{chat_id}/skills', 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/chats/{chat_id}/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'skill_ids' => [
'<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/chats/{chat_id}/skills"
payload := strings.NewReader("{\n \"skill_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.useinvent.com/chats/{chat_id}/skills")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"skill_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/chats/{chat_id}/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"skill_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"model": "<string>",
"members": [
{
"id": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"unsubscribed": true,
"ai_replies": true,
"is_admin": true
},
"link": "<string>"
}
}
],
"temporary": true,
"pinned": true,
"shared_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tools": [
{
"name": "<string>",
"display_name": "<string>",
"action_name": "<string>",
"description": "<string>",
"icon_url": "<string>",
"connection_id": "<string>",
"parameters": {},
"input": {},
"definitions": [
{
"path": "<string>",
"definition": {}
}
],
"enabled": true,
"callback": "<string>",
"validation": "<string>"
}
],
"skills": [
{
"id": "<string>",
"name": "<string>"
}
],
"features": {
"reasoning": {},
"auto_discover": true,
"web": true,
"image_generation": true,
"workbench": {
"enabled": true
}
},
"org_id": "<string>",
"state": {
"id": "<string>",
"assistant_id": "<string>",
"assistant_integration_id": "<string>",
"conversation_id": "<string>",
"ai_enabled": true,
"admin_unseen_count": 123,
"user_unseen_count": 123,
"assistant": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"avatar_url": "<string>",
"deleted": true,
"config": {
"conversation": {
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_auto_csat": true,
"enable_ai_replies": true
}
}
},
"assistant_integration": {
"id": "<string>",
"enabled": true,
"has_connection": true
},
"assigned_user": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatar": "<string>",
"seen_at": "2023-11-07T05:31:56Z"
},
"assigned_at": "2023-11-07T05:31:56Z",
"assistant_config": {
"model": "<string>",
"stt": {
"model": "<string>"
},
"tts": {
"model": "<string>",
"voice_id": "<string>"
},
"conversation": {
"enable_memories": true,
"enable_transfer_to_human_tool": true,
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_end_conversation_tool": true,
"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
},
"timezone": "<string>",
"instructions": "<string>"
},
"follow_up_at": "2023-11-07T05:31:56Z",
"muted_until": "2023-11-07T05:31:56Z",
"csat_score": 3,
"last_contact_message_at": "2023-11-07T05:31:56Z"
},
"link": "<string>",
"last_message": {
"id": "<string>",
"model": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"messages": [
{
"role": "system",
"parts": [
{
"type": "text",
"text": "<string>",
"audio": {
"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"
},
"start_timestamp": 123,
"end_timestamp": 123
}
]
}
],
"member": {
"id": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"unsubscribed": true,
"ai_replies": true,
"is_admin": true
},
"link": "<string>"
}
},
"error": "<string>",
"broadcast_id": "<string>",
"is_broadcast_message": true,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123,
"turns": [
{
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123
}
]
},
"delivered_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z"
},
"referral": {
"type": "messenger_ad",
"parts": [
{
"type": "file",
"url": "<string>",
"file": {
"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"
},
"auto_consume": true,
"start_timestamp": 123,
"end_timestamp": 123
}
],
"ref": "<string>",
"ad_id": "<string>",
"source": "<string>",
"referer_uri": "<string>",
"ads_context_data": {
"ad_title": "<string>",
"photo_url": "<string>",
"video_url": "<string>",
"post_id": "<string>",
"product_id": "<string>"
}
}
}Authorizations
Bearer token authentication using your API key
Path Parameters
Chat ID
Body
The full set of skill IDs to enable.
Replaces the set of skills enabled in a chat
The full set of skill IDs to enable in the chat
Response
The updated chat.
The title of the chat
The model used for the chat
The members of the chat
Show child attributes
Show child attributes
Whether the chat is temporary and would be deleted after 24 hours of last activity
The visibility of the chat
PRIVATE, PUBLIC_READ, PUBLIC_WRITE Whether the chat is pinned in the user interface
The status of the chat
RUNNING, COMPLETED, FAILED, CANCELED The shared URL of the chat, if it is shared
The tools available in the chat
Show child attributes
Show child attributes
The skills enabled in the chat
Show child attributes
Show child attributes
Per-chat features and run settings: model features plus approval mode, auto-discover, and org-chat tool toggles.
Show child attributes
Show child attributes
Schema for the chat state
Show child attributes
Show child attributes
The link to the chat in the integration
The chat message schema
Show child attributes
Show child attributes
Referral/commerce event data from Meta platforms — ads, products, orders.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
Show child attributes
Show child attributes
Was this page helpful?
curl --request PUT \
--url https://api.useinvent.com/chats/{chat_id}/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"skill_ids": [
"<string>"
]
}
'import requests
url = "https://api.useinvent.com/chats/{chat_id}/skills"
payload = { "skill_ids": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({skill_ids: ['<string>']})
};
fetch('https://api.useinvent.com/chats/{chat_id}/skills', 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/chats/{chat_id}/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'skill_ids' => [
'<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/chats/{chat_id}/skills"
payload := strings.NewReader("{\n \"skill_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.useinvent.com/chats/{chat_id}/skills")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"skill_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/chats/{chat_id}/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"skill_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"model": "<string>",
"members": [
{
"id": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"unsubscribed": true,
"ai_replies": true,
"is_admin": true
},
"link": "<string>"
}
}
],
"temporary": true,
"pinned": true,
"shared_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tools": [
{
"name": "<string>",
"display_name": "<string>",
"action_name": "<string>",
"description": "<string>",
"icon_url": "<string>",
"connection_id": "<string>",
"parameters": {},
"input": {},
"definitions": [
{
"path": "<string>",
"definition": {}
}
],
"enabled": true,
"callback": "<string>",
"validation": "<string>"
}
],
"skills": [
{
"id": "<string>",
"name": "<string>"
}
],
"features": {
"reasoning": {},
"auto_discover": true,
"web": true,
"image_generation": true,
"workbench": {
"enabled": true
}
},
"org_id": "<string>",
"state": {
"id": "<string>",
"assistant_id": "<string>",
"assistant_integration_id": "<string>",
"conversation_id": "<string>",
"ai_enabled": true,
"admin_unseen_count": 123,
"user_unseen_count": 123,
"assistant": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"avatar_url": "<string>",
"deleted": true,
"config": {
"conversation": {
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_auto_csat": true,
"enable_ai_replies": true
}
}
},
"assistant_integration": {
"id": "<string>",
"enabled": true,
"has_connection": true
},
"assigned_user": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatar": "<string>",
"seen_at": "2023-11-07T05:31:56Z"
},
"assigned_at": "2023-11-07T05:31:56Z",
"assistant_config": {
"model": "<string>",
"stt": {
"model": "<string>"
},
"tts": {
"model": "<string>",
"voice_id": "<string>"
},
"conversation": {
"enable_memories": true,
"enable_transfer_to_human_tool": true,
"welcome_banner": "<string>",
"suggested_messages": [
"<string>"
],
"auto_intro_message": "<string>",
"enable_end_conversation_tool": true,
"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
},
"timezone": "<string>",
"instructions": "<string>"
},
"follow_up_at": "2023-11-07T05:31:56Z",
"muted_until": "2023-11-07T05:31:56Z",
"csat_score": 3,
"last_contact_message_at": "2023-11-07T05:31:56Z"
},
"link": "<string>",
"last_message": {
"id": "<string>",
"model": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"messages": [
{
"role": "system",
"parts": [
{
"type": "text",
"text": "<string>",
"audio": {
"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"
},
"start_timestamp": 123,
"end_timestamp": 123
}
]
}
],
"member": {
"id": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>"
},
"session": {
"id": "<string>"
},
"contact_channel": {
"id": "<string>",
"user_id": "<string>",
"avatar": "<string>",
"name": "<string>",
"username": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"country": "<string>",
"agent": "<string>",
"ip": "<string>",
"language": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"blocked": true,
"unsubscribed": true,
"ai_replies": true,
"is_admin": true
},
"link": "<string>"
}
},
"error": "<string>",
"broadcast_id": "<string>",
"is_broadcast_message": true,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123,
"turns": [
{
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"reasoning_tokens": 123,
"input_tokens_cache_read": 123,
"input_tokens_cache_write": 123
}
]
},
"delivered_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z"
},
"referral": {
"type": "messenger_ad",
"parts": [
{
"type": "file",
"url": "<string>",
"file": {
"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"
},
"auto_consume": true,
"start_timestamp": 123,
"end_timestamp": 123
}
],
"ref": "<string>",
"ad_id": "<string>",
"source": "<string>",
"referer_uri": "<string>",
"ads_context_data": {
"ad_title": "<string>",
"photo_url": "<string>",
"video_url": "<string>",
"post_id": "<string>",
"product_id": "<string>"
}
}
}