Invite user to tenant
curl --request POST \
--url https://api.example.com/api/v1/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roles": "extractor-user",
"url": "https://app.extractor.dev.extractor.live/invite",
"tenantId": 123,
"organisationId": 123,
"email": "user@example.com"
}
'import requests
url = "https://api.example.com/api/v1/invite"
payload = {
"roles": "extractor-user",
"url": "https://app.extractor.dev.extractor.live/invite",
"tenantId": 123,
"organisationId": 123,
"email": "user@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
roles: 'extractor-user',
url: 'https://app.extractor.dev.extractor.live/invite',
tenantId: 123,
organisationId: 123,
email: 'user@example.com'
})
};
fetch('https://api.example.com/api/v1/invite', 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://api.example.com/api/v1/invite",
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([
'roles' => 'extractor-user',
'url' => 'https://app.extractor.dev.extractor.live/invite',
'tenantId' => 123,
'organisationId' => 123,
'email' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.example.com/api/v1/invite"
payload := strings.NewReader("{\n \"roles\": \"extractor-user\",\n \"url\": \"https://app.extractor.dev.extractor.live/invite\",\n \"tenantId\": 123,\n \"organisationId\": 123,\n \"email\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.example.com/api/v1/invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"roles\": \"extractor-user\",\n \"url\": \"https://app.extractor.dev.extractor.live/invite\",\n \"tenantId\": 123,\n \"organisationId\": 123,\n \"email\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roles\": \"extractor-user\",\n \"url\": \"https://app.extractor.dev.extractor.live/invite\",\n \"tenantId\": 123,\n \"organisationId\": 123,\n \"email\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"roles": [
"<string>"
],
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"organisationId": 123,
"expiredAt": 123
}Invite Route
Invite user to tenant
POST
/
api
/
v1
/
invite
Invite user to tenant
curl --request POST \
--url https://api.example.com/api/v1/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roles": "extractor-user",
"url": "https://app.extractor.dev.extractor.live/invite",
"tenantId": 123,
"organisationId": 123,
"email": "user@example.com"
}
'import requests
url = "https://api.example.com/api/v1/invite"
payload = {
"roles": "extractor-user",
"url": "https://app.extractor.dev.extractor.live/invite",
"tenantId": 123,
"organisationId": 123,
"email": "user@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
roles: 'extractor-user',
url: 'https://app.extractor.dev.extractor.live/invite',
tenantId: 123,
organisationId: 123,
email: 'user@example.com'
})
};
fetch('https://api.example.com/api/v1/invite', 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://api.example.com/api/v1/invite",
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([
'roles' => 'extractor-user',
'url' => 'https://app.extractor.dev.extractor.live/invite',
'tenantId' => 123,
'organisationId' => 123,
'email' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.example.com/api/v1/invite"
payload := strings.NewReader("{\n \"roles\": \"extractor-user\",\n \"url\": \"https://app.extractor.dev.extractor.live/invite\",\n \"tenantId\": 123,\n \"organisationId\": 123,\n \"email\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.example.com/api/v1/invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"roles\": \"extractor-user\",\n \"url\": \"https://app.extractor.dev.extractor.live/invite\",\n \"tenantId\": 123,\n \"organisationId\": 123,\n \"email\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roles\": \"extractor-user\",\n \"url\": \"https://app.extractor.dev.extractor.live/invite\",\n \"tenantId\": 123,\n \"organisationId\": 123,\n \"email\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"roles": [
"<string>"
],
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"organisationId": 123,
"expiredAt": 123
}Authorizations
Authentication
Body
application/json
Roles for invited user
Minimum array length:
1Example:
"extractor-user"
Invitation url, that will be added to invitation email
Minimum string length:
1Pattern:
^https?.*Example:
"https://app.extractor.dev.extractor.live/invite"
ID of the tenant
ID of the organisation
Email for which this Invite was generated
Example:
"user@example.com"
Response
200 - application/json
OK
Email for which this Invite was generated
Roles for invited user
Minimum array length:
1Unique identifier of the entity
Example:
1
Time when entity was created
Time when entity was updated
ID of the tenant
ID of the organisation
Time when this invite will be expired
⌘I