Remove user from organization
curl --request DELETE \
--url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
--header 'X-Aegister-Token: <api-key>'import requests
url = "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
headers = {"X-Aegister-Token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Aegister-Token': '<api-key>'}};
fetch('https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}', 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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}",
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-Aegister-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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Aegister-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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
.header("X-Aegister-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Aegister-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": "<array>",
"data": {
"organization": 123,
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}Users
Remove user from organization
Soft delete an Organization’s user. The authenticated user can remove the user from the organization if is part of the organization and has Owner priviledges.
DELETE
/
api
/
v1
/
organizations
/
{organizationid}
/
users
/
{userid}
Remove user from organization
curl --request DELETE \
--url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
--header 'X-Aegister-Token: <api-key>'import requests
url = "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
headers = {"X-Aegister-Token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Aegister-Token': '<api-key>'}};
fetch('https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}', 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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}",
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-Aegister-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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Aegister-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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
.header("X-Aegister-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Aegister-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": "<array>",
"data": {
"organization": 123,
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}Authorizations
ApiKeyAuthApiKeyQueryParam
Path Parameters
If the user is not already registered, this parameter can be 0.
In case is 0, the email field is required in the request body.
⌘I

