Skip to main content
POST
/
api
/
auth
/
createInstitutionForContextid
Create a new institution (Digital Twin) for a specific context URL
curl --request POST \
  --url https://pria.praxislxp.com/api/auth/createInstitutionForContextid \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "teacher1.domain.edu.instructure",
  "contactEmail": "jane.doe@praxis-ai.com",
  "ltiContextIds": [
    "https://domain.edu/7891278"
  ],
  "publicAuthorizedUrls": [
    "https://domain.edu"
  ],
  "ainame": "Hugo",
  "picture": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "picture_bg": "",
  "picture_dark_bg": "",
  "picture_animated": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "elevenlabs_agent_id": "agent_xxxxxxxxxxxxxxxxxxxx",
  "prompt": "",
  "domain": "domain.edu",
  "account": "6430736fd62d650040420674",
  "allowJoining": "disabled",
  "poolCredits": true,
  "creditAward": 0,
  "questionType": "CORPORATE",
  "rtEnabled": false,
  "rtAdminOnly": true
}
'
{
  "_id": "68793ef2a8a4a5eaff36e7ca",
  "name": "teacher1.domain.edu.instructure",
  "picture": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "picture_bg": "",
  "picture_dark_bg": "",
  "picture_animated": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "elevenlabs_agent_id": "agent_xxxxxxxxxxxxxxxxxxxx",
  "credits": 50,
  "status": "active",
  "allowJoining": "disabled",
  "joiningAdminOnly": false,
  "publicId": "2e1006ec-5b59-4431-96d2-b0e1b1022a3a",
  "publicAuthorizedUrls": [
    "https://domain.edu"
  ],
  "ainame": "Hugo",
  "prompt": "",
  "contactEmail": "jane.doe@praxis-ai.com",
  "creditAward": 0,
  "poolCredits": true,
  "questionType": "CORPORATE",
  "rtEnabled": false,
  "rtAdminOnly": true,
  "created": "2025-07-17T18:20:34.330Z",
  "id": "68793ef2a8a4a5eaff36e7ca"
}

Body

application/json
name
string
required

Institution name identifier

Example:

"teacher1.domain.edu.instructure"

contactEmail
string<email>
required

Contact email for the institution

Example:

"jane.doe@praxis-ai.com"

ltiContextIds
string[]

Array of LTI context identifiers (defaults to empty array if omitted)

Example:
["https://domain.edu/7891278"]
publicAuthorizedUrls
string[]

Array of authorized public URLs

Example:
["https://domain.edu"]
ainame
string

AI assistant name

Example:

"Hugo"

picture
string<uri>

URL to the institution's picture/avatar

Example:

"https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif"

picture_bg
string

Background picture URL

Example:

""

picture_dark_bg
string

Dark mode background picture URL

Example:

""

picture_animated
string<uri>

URL to animated picture/avatar

Example:

"https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif"

elevenlabs_agent_id
string

ElevenLabs Agent ID for Digital Twin Voice

Example:

"agent_xxxxxxxxxxxxxxxxxxxx"

prompt
string

Custom prompt/instructions for the AI persona

Example:

""

domain
string

Institution domain, used for account lookup

Example:

"domain.edu"

account
string

Parent account ObjectId (if known)

Example:

"6430736fd62d650040420674"

allowJoining
enum<string>

Who can join this Digital Twin

Available options:
disabled,
account,
public
Example:

"disabled"

poolCredits
boolean

Whether credits are pooled on behalf of users

Example:

true

creditAward
integer

Credits awarded to new users on registration (when poolCredits is false)

Example:

0

questionType
string

Type of personalization question bank (CORPORATE for Digital Twin, INSTITUTION for Digital Expert)

Example:

"CORPORATE"

rtEnabled
boolean

Enable real-time voice conversations

Example:

false

rtAdminOnly
boolean

Restrict real-time conversations to admins only

Example:

true

Response

Institution created successfully

_id
string

Unique institution identifier

Example:

"68793ef2a8a4a5eaff36e7ca"

name
string
Example:

"teacher1.domain.edu.instructure"

picture
string<uri>
Example:

"https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif"

picture_bg
string
Example:

""

picture_dark_bg
string
Example:

""

picture_animated
string<uri>
Example:

"https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif"

elevenlabs_agent_id
string

ElevenLabs Agent ID for Digital Twin Voice

Example:

"agent_xxxxxxxxxxxxxxxxxxxx"

credits
number

Total credits allocated

Example:

50

status
enum<string>
Available options:
active,
inactive
Example:

"active"

allowJoining
enum<string>
Available options:
disabled,
account,
public
Example:

"disabled"

joiningAdminOnly
boolean
Example:

false

publicId
string<uuid>

Public identifier for the institution

Example:

"2e1006ec-5b59-4431-96d2-b0e1b1022a3a"

publicAuthorizedUrls
string[]
Example:
["https://domain.edu"]
ainame
string
Example:

"Hugo"

prompt
string
Example:

""

contactEmail
string<email>
Example:

"jane.doe@praxis-ai.com"

creditAward
number
Example:

0

poolCredits
boolean
Example:

true

questionType
string

Personalization question bank type

Example:

"CORPORATE"

rtEnabled
boolean

Whether real-time voice conversations are enabled

Example:

false

rtAdminOnly
boolean

Whether real-time conversations are restricted to admins

Example:

true

created
string<date-time>
Example:

"2025-07-17T18:20:34.330Z"

id
string
Example:

"68793ef2a8a4a5eaff36e7ca"