Skip to main content
POST
/
api
/
user
/
assistant
Create a new assistant
curl --request POST \
  --url https://pria.praxislxp.com/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://pria.praxislxp.com/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://pria.praxislxp.com/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://pria.praxislxp.com/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://pria.praxislxp.com/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://pria.praxislxp.com/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://pria.praxislxp.com/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!"
}
{
"success": false,
"error": {},
"message": "Error creating assistant <details>"
}
{
"success": false,
"message": "Authentication Required"
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
name
string
required

Name of the assistant (required, must be unique per user+institution)

Example:

"New Assistant 1"

status
enum<string>
default:active

Status of the assistant

Available options:
active,
unpublished,
inactive,
deleted
Example:

"active"

description
string
default:""

Description of the assistant

Example:

"New Assistant Description"

instructions
string
default:""

Behavioral instructions for the assistant

Example:

"New Assistant Instructions"

argument_1
string | null

Optional argument 1

argument_2
string | null

Optional argument 2

argument_3
string | null

Optional argument 3

argument_4
string | null

Optional argument 4

argument_5
string | null

Optional argument 5

picture_url
string

URL for the assistant's profile picture

Example:

"https://example.com/image.jpeg"

admin_only
boolean
default:false

Whether the assistant is restricted to admin users

Example:

true

remember_history
integer
default:3

Number of conversation history items to remember

Example:

3

editable_others
boolean
default:false

Whether the assistant can be edited by other users

Example:

true

user
string

User ObjectId who owns this assistant

Example:

"6430d02554cd4e00403e8b05"

institution
string

Institution ObjectId. If empty string, field is removed.

Example:

"6631915765bb0a94cfd6ca99"

institution_shared
boolean
default:false

Whether shared with the institution. Auto-reset to false if no institution provided.

Example:

true

account_shared
boolean
default:false

Whether shared across the account. Auto-reset to false if institution_shared is not true.

Example:

false

ragEnabled
boolean
default:true

Whether RAG is enabled for this assistant

bypassSystemContext
boolean
default:false

Whether to bypass the system context prompt

conversationModel
string

Optional model override for this assistant (max 200 chars)

stsConversationModel
string

Optional STS/voice conversation model; used only in ElevenLabs/Anam voice mode (max 200 chars)

Response

Assistant successfully created

success
boolean
Example:

true

id
string

ObjectId of the created assistant

Example:

"687e761093c797174459c651"

message
string
Example:

"Assistant created!"