Remove user institution membership
curl --request DELETE \
--url https://hiimpria.ai/api/user/userInstitution/{id} \
--header 'x-access-token: <api-key>'import requests
url = "https://hiimpria.ai/api/user/userInstitution/{id}"
headers = {"x-access-token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-access-token': '<api-key>'}};
fetch('https://hiimpria.ai/api/user/userInstitution/{id}', 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://hiimpria.ai/api/user/userInstitution/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://hiimpria.ai/api/user/userInstitution/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://hiimpria.ai/api/user/userInstitution/{id}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/userInstitution/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "You left successfully!"
}{
"success": false,
"message": "Invalid user institution Id"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Invalid Membership. Not yours!"
}{
"success": false,
"message": "Not Found"
}{
"success": false,
"message": "Add another admin to Biology 101 before you leave."
}Membership
Remove user institution membership
Removes a user’s membership from an institution (also cancels a pending join request). If removing the currently active profile, the user is automatically switched to another active membership, or to no Digital Twin when none is left. The only admin of a twin (no other active admin) cannot leave while other people (active or inactive rows) are in it: 409. Every removal is written to the membership audit ledger (detail self-leave).
DELETE
/
api
/
user
/
userInstitution
/
{id}
Remove user institution membership
curl --request DELETE \
--url https://hiimpria.ai/api/user/userInstitution/{id} \
--header 'x-access-token: <api-key>'import requests
url = "https://hiimpria.ai/api/user/userInstitution/{id}"
headers = {"x-access-token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-access-token': '<api-key>'}};
fetch('https://hiimpria.ai/api/user/userInstitution/{id}', 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://hiimpria.ai/api/user/userInstitution/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://hiimpria.ai/api/user/userInstitution/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://hiimpria.ai/api/user/userInstitution/{id}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/userInstitution/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "You left successfully!"
}{
"success": false,
"message": "Invalid user institution Id"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Invalid Membership. Not yours!"
}{
"success": false,
"message": "Not Found"
}{
"success": false,
"message": "Add another admin to Biology 101 before you leave."
}Was this page helpful?