Assistants
Rotate assistant secret key
Rotate the secret key for a specific assistant.
POST
/
orgs
/
{org_id}
/
assistants
/
{assistant_id}
/
rotate-secret-key
Rotate assistant secret key
curl --request POST \
--url https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key', 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}/rotate-secret-key",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key"
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))
}HttpResponse<String> response = Unirest.post("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"deleted": true,
"secret_key": "<string>",
"avatar_url": "<string>",
"config": {
"language": "auto",
"model": "<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": {}
},
"channels": [
{
"id": "<string>",
"enabled": true,
"channel_type": "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": "id",
"name": "<string>",
"description": "<string>",
"optional": true,
"array": true,
"placeholder": "<string>",
"display": {
"field": "inline",
"container": "grid",
"empty": "show"
},
"prefix": "<string>"
},
"readonly": true,
"sortable": true,
"groupable_in": [
"table"
],
"kind": "system"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"spending_cap": {
"id": "<string>",
"amount": 123,
"used": 123
},
"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": {
"email": true,
"push": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"billing": {
"email": true,
"push": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"agent_attention": {
"email": true,
"push": true,
"notified_at": "2023-11-07T05:31:56Z"
}
}
},
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": "red",
"permissions": [
"org:write"
]
}
],
"spending_cap": {
"id": "<string>",
"amount": 123,
"used": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z",
"routines_count": 123
}
],
"members_count": 123
}Authorizations
Bearer token authentication using your API key
Path Parameters
The ID of the org
The ID of the assistant
Response
200 - application/json
The updated assistant with a new secret key.
Schema for an assistant
The name of the assistant
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
A monthly spending cap on a user, an agent or an assistant
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?
⌘I
Rotate assistant secret key
curl --request POST \
--url https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key', 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}/rotate-secret-key",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key"
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))
}HttpResponse<String> response = Unirest.post("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/assistants/{assistant_id}/rotate-secret-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"deleted": true,
"secret_key": "<string>",
"avatar_url": "<string>",
"config": {
"language": "auto",
"model": "<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": {}
},
"channels": [
{
"id": "<string>",
"enabled": true,
"channel_type": "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": "id",
"name": "<string>",
"description": "<string>",
"optional": true,
"array": true,
"placeholder": "<string>",
"display": {
"field": "inline",
"container": "grid",
"empty": "show"
},
"prefix": "<string>"
},
"readonly": true,
"sortable": true,
"groupable_in": [
"table"
],
"kind": "system"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"spending_cap": {
"id": "<string>",
"amount": 123,
"used": 123
},
"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": {
"email": true,
"push": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"billing": {
"email": true,
"push": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"agent_attention": {
"email": true,
"push": true,
"notified_at": "2023-11-07T05:31:56Z"
}
}
},
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": "red",
"permissions": [
"org:write"
]
}
],
"spending_cap": {
"id": "<string>",
"amount": 123,
"used": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z",
"routines_count": 123
}
],
"members_count": 123
}