curl --request POST \
--url https://hiimpria.ai/api/user/assistant \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "New Assistant 1",
"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": "https://example.com/image.jpeg",
"admin_only": true,
"remember_history": 3,
"editable_others": true,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": true,
"account_shared": false,
"ragEnabled": true,
"bypassSystemContext": false,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/user/assistant"
payload = {
"name": "New Assistant 1",
"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": "https://example.com/image.jpeg",
"admin_only": True,
"remember_history": 3,
"editable_others": True,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": True,
"account_shared": False,
"ragEnabled": True,
"bypassSystemContext": False,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Assistant 1',
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: 'https://example.com/image.jpeg',
admin_only: true,
remember_history: 3,
editable_others: true,
user: '6430d02554cd4e00403e8b05',
institution: '6631915765bb0a94cfd6ca99',
institution_shared: true,
account_shared: false,
ragEnabled: true,
bypassSystemContext: false,
conversationModel: '<string>',
stsConversationModel: '<string>'
})
};
fetch('https://hiimpria.ai/api/user/assistant', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'New Assistant 1',
'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' => 'https://example.com/image.jpeg',
'admin_only' => true,
'remember_history' => 3,
'editable_others' => true,
'user' => '6430d02554cd4e00403e8b05',
'institution' => '6631915765bb0a94cfd6ca99',
'institution_shared' => true,
'account_shared' => false,
'ragEnabled' => true,
'bypassSystemContext' => false,
'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"
payload := strings.NewReader("{\n \"name\": \"New Assistant 1\",\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\": \"https://example.com/image.jpeg\",\n \"admin_only\": true,\n \"remember_history\": 3,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": false,\n \"ragEnabled\": true,\n \"bypassSystemContext\": false,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://hiimpria.ai/api/user/assistant")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Assistant 1\",\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\": \"https://example.com/image.jpeg\",\n \"admin_only\": true,\n \"remember_history\": 3,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": false,\n \"ragEnabled\": true,\n \"bypassSystemContext\": false,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/assistant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Assistant 1\",\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\": \"https://example.com/image.jpeg\",\n \"admin_only\": true,\n \"remember_history\": 3,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": false,\n \"ragEnabled\": true,\n \"bypassSystemContext\": false,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "687e761093c797174459c651",
"message": "Assistant created!",
"scope": "instance",
"sharingDropped": false
}{
"success": false,
"error": {},
"message": "Error creating assistant <details>"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Assistant creation is turned off for this Digital Twin"
}{
"success": false,
"message": "Twin not found"
}Create a new assistant
Creates a new AI assistant owned by the caller. Only the name field is required (other fields have defaults). If institution is an empty string it is removed from the body; a Digital Twin named here must be one the caller belongs to. Sharing with everyone in the Digital Twin (institution_shared), with every Digital Twin of its account (account_shared), and admin_only are kept only for the twin’s administrators and people allowed to edit its assistants; for anyone else they are set to false and the assistant is saved as a personal one — the request is not refused, and the answer says where the assistant was saved (scope) and whether the sharing asked for was dropped (sharingDropped). account_shared needs institution_shared and a Digital Twin that belongs to an account. When the Digital Twin turned off assistant creation for its users, the request is refused with 403 unless the caller administers it or may edit its assistants. Duplicate assistants (same name + user + institution) are caught as a 400 error by the unique index constraint, not as a 409.
curl --request POST \
--url https://hiimpria.ai/api/user/assistant \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "New Assistant 1",
"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": "https://example.com/image.jpeg",
"admin_only": true,
"remember_history": 3,
"editable_others": true,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": true,
"account_shared": false,
"ragEnabled": true,
"bypassSystemContext": false,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/user/assistant"
payload = {
"name": "New Assistant 1",
"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": "https://example.com/image.jpeg",
"admin_only": True,
"remember_history": 3,
"editable_others": True,
"user": "6430d02554cd4e00403e8b05",
"institution": "6631915765bb0a94cfd6ca99",
"institution_shared": True,
"account_shared": False,
"ragEnabled": True,
"bypassSystemContext": False,
"conversationModel": "<string>",
"stsConversationModel": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Assistant 1',
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: 'https://example.com/image.jpeg',
admin_only: true,
remember_history: 3,
editable_others: true,
user: '6430d02554cd4e00403e8b05',
institution: '6631915765bb0a94cfd6ca99',
institution_shared: true,
account_shared: false,
ragEnabled: true,
bypassSystemContext: false,
conversationModel: '<string>',
stsConversationModel: '<string>'
})
};
fetch('https://hiimpria.ai/api/user/assistant', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'New Assistant 1',
'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' => 'https://example.com/image.jpeg',
'admin_only' => true,
'remember_history' => 3,
'editable_others' => true,
'user' => '6430d02554cd4e00403e8b05',
'institution' => '6631915765bb0a94cfd6ca99',
'institution_shared' => true,
'account_shared' => false,
'ragEnabled' => true,
'bypassSystemContext' => false,
'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"
payload := strings.NewReader("{\n \"name\": \"New Assistant 1\",\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\": \"https://example.com/image.jpeg\",\n \"admin_only\": true,\n \"remember_history\": 3,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": false,\n \"ragEnabled\": true,\n \"bypassSystemContext\": false,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://hiimpria.ai/api/user/assistant")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Assistant 1\",\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\": \"https://example.com/image.jpeg\",\n \"admin_only\": true,\n \"remember_history\": 3,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": false,\n \"ragEnabled\": true,\n \"bypassSystemContext\": false,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/assistant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Assistant 1\",\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\": \"https://example.com/image.jpeg\",\n \"admin_only\": true,\n \"remember_history\": 3,\n \"editable_others\": true,\n \"user\": \"6430d02554cd4e00403e8b05\",\n \"institution\": \"6631915765bb0a94cfd6ca99\",\n \"institution_shared\": true,\n \"account_shared\": false,\n \"ragEnabled\": true,\n \"bypassSystemContext\": false,\n \"conversationModel\": \"<string>\",\n \"stsConversationModel\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "687e761093c797174459c651",
"message": "Assistant created!",
"scope": "instance",
"sharingDropped": false
}{
"success": false,
"error": {},
"message": "Error creating assistant <details>"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Assistant creation is turned off for this Digital Twin"
}{
"success": false,
"message": "Twin not found"
}Body
Response
Assistant successfully created
Was this page helpful?