Skip to main content
POST
/
api
/
auth
/
createInstitutionForContextid
Create a new institution (Digital Twin) for a specific context URL
curl --request POST \
  --url http://localhost:3000/api/auth/createInstitutionForContextid \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "teacher1.domain.edu.instructure",
  "contactEmail": "[email protected]",
  "ltiContextIds": [
    "https://domain.edu/7891278"
  ],
  "publicAuthorizedUrls": [
    "https://domain.edu"
  ],
  "ainame": "Hugo",
  "picture": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "picture_bg": "",
  "picture_animated": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "prompt": "",
  "domain": "domain.edu"
}
'
{
  "_id": "68793ef2a8a4a5eaff36e7ca",
  "name": "teacher1.domain.edu.instructure",
  "picture": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "picture_bg": "",
  "picture_animated": "https://hiimpria.ai/uploads/6430736fd62d650040420674/Clarkey20Headshot20Animated_1752713782148.gif",
  "credits": 50,
  "status": "active",
  "allowJoining": "disabled",
  "joiningAdminOnly": false,
  "publicId": "2e1006ec-5b59-4431-96d2-b0e1b1022a3a",
  "publicAuthorizedUrls": [
    "https://domain.edu"
  ],
  "ainame": "Hugo",
  "prompt": "",
  "contactEmail": "[email protected]",
  "creditAward": 0,
  "poolCredits": 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

ltiContextIds
string[]
required

Array of LTI context identifiers

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_animated
string<uri>

URL to animated picture/avatar

Example:

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

prompt
string

Custom prompt for the AI

Example:

""

domain
string

Institution domain

Example:

"domain.edu"

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_animated
string<uri>
Example:

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

credits
number

Total credits allocated

Example:

50

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

"active"

allowJoining
enum<string>
Available options:
enabled,
disabled
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>
creditAward
number
Example:

0

poolCredits
boolean
Example:

true

created
string<date-time>
Example:

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

id
string
Example:

"68793ef2a8a4a5eaff36e7ca"