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>"
}
'
{
  "success": true,
  "id": "687e761093c797174459c651",
  "message": "Assistant created!"
}

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)

Response

Assistant successfully created

success
boolean
Example:

true

id
string

ObjectId of the created assistant

Example:

"687e761093c797174459c651"

message
string
Example:

"Assistant created!"