Reassign an institution to a different account
curl --request PATCH \
--url https://pria.praxislxp.com/api/admin/institution/{id}/account \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"account": "<string>"
}
'import requests
url = "https://pria.praxislxp.com/api/admin/institution/{id}/account"
payload = { "account": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({account: '<string>'})
};
fetch('https://pria.praxislxp.com/api/admin/institution/{id}/account', 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/institution/{id}/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '<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/admin/institution/{id}/account"
payload := strings.NewReader("{\n \"account\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://pria.praxislxp.com/api/admin/institution/{id}/account")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/admin/institution/{id}/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"name": "<string>",
"status": "<string>",
"ainame": "<string>",
"lastActivityAt": "2023-11-07T05:31:56Z",
"account": {
"_id": "<string>",
"name": "<string>"
}
},
"message": "<string>"
}Admin Institutions
Reassign an institution to a different account
Clean-room endpoint with strict field whitelisting. Only the account field is accepted.
Non-super users must have access to both the source institution and the target account.
Passing account: null detaches the institution from its parent account — super users only.
PATCH
/
api
/
admin
/
institution
/
{id}
/
account
Reassign an institution to a different account
curl --request PATCH \
--url https://pria.praxislxp.com/api/admin/institution/{id}/account \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"account": "<string>"
}
'import requests
url = "https://pria.praxislxp.com/api/admin/institution/{id}/account"
payload = { "account": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({account: '<string>'})
};
fetch('https://pria.praxislxp.com/api/admin/institution/{id}/account', 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/institution/{id}/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '<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/admin/institution/{id}/account"
payload := strings.NewReader("{\n \"account\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://pria.praxislxp.com/api/admin/institution/{id}/account")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/admin/institution/{id}/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"name": "<string>",
"status": "<string>",
"ainame": "<string>",
"lastActivityAt": "2023-11-07T05:31:56Z",
"account": {
"_id": "<string>",
"name": "<string>"
}
},
"message": "<string>"
}Authorizations
JWT token passed in x-access-token header
Path Parameters
Institution ID to reassign
Body
application/json
Target account ID (or null to detach — super-only)
Was this page helpful?
⌘I