cURL
curl --request POST \
--url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload = { "email": "jsmith@example.com" }
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\"\n}")
.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::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": [],
"data": {
"organization": 123,
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": 1,
"messages": [
"Invalid data provided"
]
}{
"error": 1,
"messages": [
9153
]
}{
"error": 1,
"messages": []
}Users
Create Organization user
Create Organization’s user.
The authenticated user can add the user to the organization if is part of the organization and has Owner priviledges.
After the user has been added to the organization, an invitation email will be sent.
POST
/
api
/
v1
/
organizations
/
{organizationid}
/
users
/
{userid}
cURL
curl --request POST \
--url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload = { "email": "jsmith@example.com" }
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-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://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid}")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\"\n}")
.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::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": [],
"data": {
"organization": 123,
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": 1,
"messages": [
"Invalid data provided"
]
}{
"error": 1,
"messages": [
9153
]
}{
"error": 1,
"messages": []
}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.
Body
application/jsonmultipart/form-data
Define user role inside the organization.
Assignable roles are:
owner: can manage all aspect of the organizationsecurity_officer: can edit basic informations of the organizationviewer: can only view informations of the organization
Available options:
viewer, security_officer, owner This is required if userid path parameter is 0.

