curl --request PUT \
--url https://hiimpria.ai/api/user/assistant/{id} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "New Assistant Updated",
"status": "active",
"description": "New Assistant Description",
"instructions": "New Assistant Instructions",
"argument_1": "<string>",
"argument_2": "<string>",
"argument_3": "<string>",
"argument_4": "<string>",
"argument_5": "<string>",
"picture_url": "<string>",
"admin_only": true,
"remember_history": 123,
"editable_others": true,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": true,
"account_shared": true,
"ragEnabled": true,
"bypassSystemContext": true,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/user/assistant/{id}"
payload = {
"name": "New Assistant Updated",
"status": "active",
"description": "New Assistant Description",
"instructions": "New Assistant Instructions",
"argument_1": "<string>",
"argument_2": "<string>",
"argument_3": "<string>",
"argument_4": "<string>",
"argument_5": "<string>",
"picture_url": "<string>",
"admin_only": True,
"remember_history": 123,
"editable_others": True,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": True,
"account_shared": True,
"ragEnabled": True,
"bypassSystemContext": True,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Assistant Updated',
status: 'active',
description: 'New Assistant Description',
instructions: 'New Assistant Instructions',
argument_1: '<string>',
argument_2: '<string>',
argument_3: '<string>',
argument_4: '<string>',
argument_5: '<string>',
picture_url: '<string>',
admin_only: true,
remember_history: 123,
editable_others: true,
user: '6430d02554cd4e00403e8b05',
institution: '6631915765bb0a94cfd6ca99',
institution_shared: true,
account_shared: true,
ragEnabled: true,
bypassSystemContext: true,
conversationModel: '<string>',
stsConversationModel: '<string>'
})
};
fetch('https://hiimpria.ai/api/user/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://hiimpria.ai/api/user/assistant/{id}",
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([
'name' => 'New Assistant Updated',
'status' => 'active',
'description' => 'New Assistant Description',
'instructions' => 'New Assistant Instructions',
'argument_1' => '<string>',
'argument_2' => '<string>',
'argument_3' => '<string>',
'argument_4' => '<string>',
'argument_5' => '<string>',
'picture_url' => '<string>',
'admin_only' => true,
'remember_history' => 123,
'editable_others' => true,
'user' => '6430d02554cd4e00403e8b05',
'institution' => '6631915765bb0a94cfd6ca99',
'institution_shared' => true,
'account_shared' => true,
'ragEnabled' => true,
'bypassSystemContext' => true,
'conversationModel' => '<string>',
'stsConversationModel' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://hiimpria.ai/api/user/assistant/{id}"
payload := strings.NewReader("{\n \"name\": \"New Assistant Updated\",\n \"status\": \"active\",\n \"description\": \"New Assistant Description\",\n \"instructions\": \"New Assistant Instructions\",\n \"argument_1\": \"<string>\",\n \"argument_2\": \"<string>\",\n \"argument_3\": \"<string>\",\n \"argument_4\": \"<string>\",\n \"argument_5\": \"<string>\",\n \"picture_url\": \"<string>\",\n \"admin_only\": true,\n \"remember_history\": 123,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": true,\n \"ragEnabled\": true,\n \"bypassSystemContext\": true,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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://hiimpria.ai/api/user/assistant/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Assistant Updated\",\n \"status\": \"active\",\n \"description\": \"New Assistant Description\",\n \"instructions\": \"New Assistant Instructions\",\n \"argument_1\": \"<string>\",\n \"argument_2\": \"<string>\",\n \"argument_3\": \"<string>\",\n \"argument_4\": \"<string>\",\n \"argument_5\": \"<string>\",\n \"picture_url\": \"<string>\",\n \"admin_only\": true,\n \"remember_history\": 123,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": true,\n \"ragEnabled\": true,\n \"bypassSystemContext\": true,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/assistant/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Assistant Updated\",\n \"status\": \"active\",\n \"description\": \"New Assistant Description\",\n \"instructions\": \"New Assistant Instructions\",\n \"argument_1\": \"<string>\",\n \"argument_2\": \"<string>\",\n \"argument_3\": \"<string>\",\n \"argument_4\": \"<string>\",\n \"argument_5\": \"<string>\",\n \"picture_url\": \"<string>\",\n \"admin_only\": true,\n \"remember_history\": 123,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": true,\n \"ragEnabled\": true,\n \"bypassSystemContext\": true,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Assistant updated!",
"scope": "user",
"sharingDropped": false
}{
"success": false,
"error": {},
"message": "Invalid Properties"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Assistant creation is turned off for this Digital Twin"
}{
"success": false,
"message": "Assistant not found!"
}Update an existing assistant
Updates an existing assistant by its ObjectId. The caller must own the assistant, or it must be open to others (editable_others), or the caller must hold assistants.edit on its Digital Twin. Only the assistant’s own fields are written (the owner, the creation date and the like counter are ignored; unknown keys are ignored); a value outside an enum (status, assistantToolMode, stsReasoningEffort) is refused with 400. Update operators are refused. An empty institution makes the assistant personal (and no longer shared); a different institution moves it and requires membership of that Digital Twin. Sharing (institution_shared, account_shared) and admin_only are decided on the Digital Twin the assistant will be in: only its administrators and people allowed to edit its assistants may turn them on, or turn them off on someone else’s assistant; an assistant moved to another Digital Twin by anyone else arrives unshared. Such a change is not refused — it is not applied, and the answer reports where the assistant is (scope) and whether the sharing asked for was dropped (sharingDropped). Moving an assistant into a Digital Twin that turned off assistant creation for its users is refused with 403 unless the caller administers it or may edit its assistants. account_shared is reset to false when the assistant will not be shared with its Digital Twin, and cannot be turned on when the Digital Twin belongs to no account.
curl --request PUT \
--url https://hiimpria.ai/api/user/assistant/{id} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "New Assistant Updated",
"status": "active",
"description": "New Assistant Description",
"instructions": "New Assistant Instructions",
"argument_1": "<string>",
"argument_2": "<string>",
"argument_3": "<string>",
"argument_4": "<string>",
"argument_5": "<string>",
"picture_url": "<string>",
"admin_only": true,
"remember_history": 123,
"editable_others": true,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": true,
"account_shared": true,
"ragEnabled": true,
"bypassSystemContext": true,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/user/assistant/{id}"
payload = {
"name": "New Assistant Updated",
"status": "active",
"description": "New Assistant Description",
"instructions": "New Assistant Instructions",
"argument_1": "<string>",
"argument_2": "<string>",
"argument_3": "<string>",
"argument_4": "<string>",
"argument_5": "<string>",
"picture_url": "<string>",
"admin_only": True,
"remember_history": 123,
"editable_others": True,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": True,
"account_shared": True,
"ragEnabled": True,
"bypassSystemContext": True,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Assistant Updated',
status: 'active',
description: 'New Assistant Description',
instructions: 'New Assistant Instructions',
argument_1: '<string>',
argument_2: '<string>',
argument_3: '<string>',
argument_4: '<string>',
argument_5: '<string>',
picture_url: '<string>',
admin_only: true,
remember_history: 123,
editable_others: true,
user: '6430d02554cd4e00403e8b05',
institution: '6631915765bb0a94cfd6ca99',
institution_shared: true,
account_shared: true,
ragEnabled: true,
bypassSystemContext: true,
conversationModel: '<string>',
stsConversationModel: '<string>'
})
};
fetch('https://hiimpria.ai/api/user/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://hiimpria.ai/api/user/assistant/{id}",
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([
'name' => 'New Assistant Updated',
'status' => 'active',
'description' => 'New Assistant Description',
'instructions' => 'New Assistant Instructions',
'argument_1' => '<string>',
'argument_2' => '<string>',
'argument_3' => '<string>',
'argument_4' => '<string>',
'argument_5' => '<string>',
'picture_url' => '<string>',
'admin_only' => true,
'remember_history' => 123,
'editable_others' => true,
'user' => '6430d02554cd4e00403e8b05',
'institution' => '6631915765bb0a94cfd6ca99',
'institution_shared' => true,
'account_shared' => true,
'ragEnabled' => true,
'bypassSystemContext' => true,
'conversationModel' => '<string>',
'stsConversationModel' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://hiimpria.ai/api/user/assistant/{id}"
payload := strings.NewReader("{\n \"name\": \"New Assistant Updated\",\n \"status\": \"active\",\n \"description\": \"New Assistant Description\",\n \"instructions\": \"New Assistant Instructions\",\n \"argument_1\": \"<string>\",\n \"argument_2\": \"<string>\",\n \"argument_3\": \"<string>\",\n \"argument_4\": \"<string>\",\n \"argument_5\": \"<string>\",\n \"picture_url\": \"<string>\",\n \"admin_only\": true,\n \"remember_history\": 123,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": true,\n \"ragEnabled\": true,\n \"bypassSystemContext\": true,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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://hiimpria.ai/api/user/assistant/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Assistant Updated\",\n \"status\": \"active\",\n \"description\": \"New Assistant Description\",\n \"instructions\": \"New Assistant Instructions\",\n \"argument_1\": \"<string>\",\n \"argument_2\": \"<string>\",\n \"argument_3\": \"<string>\",\n \"argument_4\": \"<string>\",\n \"argument_5\": \"<string>\",\n \"picture_url\": \"<string>\",\n \"admin_only\": true,\n \"remember_history\": 123,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": true,\n \"ragEnabled\": true,\n \"bypassSystemContext\": true,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/assistant/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Assistant Updated\",\n \"status\": \"active\",\n \"description\": \"New Assistant Description\",\n \"instructions\": \"New Assistant Instructions\",\n \"argument_1\": \"<string>\",\n \"argument_2\": \"<string>\",\n \"argument_3\": \"<string>\",\n \"argument_4\": \"<string>\",\n \"argument_5\": \"<string>\",\n \"picture_url\": \"<string>\",\n \"admin_only\": true,\n \"remember_history\": 123,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": true,\n \"ragEnabled\": true,\n \"bypassSystemContext\": true,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Assistant updated!",
"scope": "user",
"sharingDropped": false
}{
"success": false,
"error": {},
"message": "Invalid Properties"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Assistant creation is turned off for this Digital Twin"
}{
"success": false,
"message": "Assistant not found!"
}Body
Any assistant fields. No required fields for update. An empty institution makes the assistant personal; user, created and liked_count are ignored.
Response
Assistant successfully updated
Was this page helpful?