Skip to main content
POST
/
api
/
admin
/
questions
Retrieve institutional assessment questions
curl --request POST \
  --url https://pria.praxislxp.com/api/admin/questions \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "minimum": true,
  "questionType": "PERSONA"
}
'
import requests

url = "https://pria.praxislxp.com/api/admin/questions"

payload = {
    "minimum": True,
    "questionType": "PERSONA"
}
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({minimum: true, questionType: 'PERSONA'})
};

fetch('https://pria.praxislxp.com/api/admin/questions', 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/admin/questions",
  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([
    'minimum' => true,
    'questionType' => 'PERSONA'
  ]),
  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/admin/questions"

	payload := strings.NewReader("{\n  \"minimum\": true,\n  \"questionType\": \"PERSONA\"\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/admin/questions")
  .header("x-access-token", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"minimum\": true,\n  \"questionType\": \"PERSONA\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://pria.praxislxp.com/api/admin/questions")

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  \"minimum\": true,\n  \"questionType\": \"PERSONA\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": [
    {
      "_id": "6657cb7f4f9e80ae6b52f9f1",
      "code": "PERSONA_01",
      "question": "Your full name",
      "objectif": "Tell us who you are so your twin can introduce itself.",
      "required": true,
      "position": 1,
      "status": "active",
      "created": "2024-05-30T00:42:39.441Z",
      "section": 1,
      "mbti": false,
      "type": "text"
    }
  ]
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
minimum
boolean

Flag to return minimal question data (bypasses pagination, returns all)

questionType
enum<string>

Question bank (code prefix) to retrieve. "PERSONA" is the single live onboarding bank; legacy INSTITUTION/CORPORATE banks are retired (inactive) but still visible in the library filter.

Available options:
PERSONA
page
integer
default:1

Page number (1-based, ignored if minimum=true)

Required range: x >= 1
pageSize
integer
default:100

Number of results per page (ignored if minimum=true)

Required range: 1 <= x <= 5000

Response

Successfully retrieved questions

success
boolean

Indicates if the request was successful

data
object[]

Array of questions

total
integer

Total number of matching questions (omitted if minimum=true)

hasMore
boolean

Whether more results are available (omitted if minimum=true)

page
integer

Current page number (omitted if minimum=true)

pageSize
integer

Number of results per page (omitted if minimum=true)

message
string

Response message