Invite user to organization
curl --request POST \
--url https://api-eu.cybedefend.com/organization/{organizationId}/invite \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"teamAssignments": [
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"role": "developer"
},
{
"teamId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"role": "team_manager"
}
]
}
'import requests
url = "https://api-eu.cybedefend.com/organization/{organizationId}/invite"
payload = {
"email": "jsmith@example.com",
"teamAssignments": [
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"role": "developer"
},
{
"teamId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"role": "team_manager"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
teamAssignments: [
{teamId: '550e8400-e29b-41d4-a716-446655440000', role: 'developer'},
{teamId: '6ba7b810-9dad-11d1-80b4-00c04fd430c8', role: 'team_manager'}
]
})
};
fetch('https://api-eu.cybedefend.com/organization/{organizationId}/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-eu.cybedefend.com/organization/{organizationId}/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([
'email' => 'jsmith@example.com',
'teamAssignments' => [
[
'teamId' => '550e8400-e29b-41d4-a716-446655440000',
'role' => 'developer'
],
[
'teamId' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
'role' => 'team_manager'
]
]
]),
CURLOPT_HTTPHEADER => [
"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-eu.cybedefend.com/organization/{organizationId}/invite"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"teamAssignments\": [\n {\n \"teamId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"role\": \"developer\"\n },\n {\n \"teamId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"role\": \"team_manager\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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-eu.cybedefend.com/organization/{organizationId}/invite")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"teamAssignments\": [\n {\n \"teamId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"role\": \"developer\"\n },\n {\n \"teamId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"role\": \"team_manager\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/organization/{organizationId}/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"teamAssignments\": [\n {\n \"teamId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"role\": \"developer\"\n },\n {\n \"teamId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"role\": \"team_manager\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>",
"email": "<string>",
"status": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationName": "<string>",
"organizationRole": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}Invitations
Invite user to organization
POST
/
organization
/
{organizationId}
/
invite
Invite user to organization
curl --request POST \
--url https://api-eu.cybedefend.com/organization/{organizationId}/invite \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"teamAssignments": [
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"role": "developer"
},
{
"teamId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"role": "team_manager"
}
]
}
'import requests
url = "https://api-eu.cybedefend.com/organization/{organizationId}/invite"
payload = {
"email": "jsmith@example.com",
"teamAssignments": [
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"role": "developer"
},
{
"teamId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"role": "team_manager"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
teamAssignments: [
{teamId: '550e8400-e29b-41d4-a716-446655440000', role: 'developer'},
{teamId: '6ba7b810-9dad-11d1-80b4-00c04fd430c8', role: 'team_manager'}
]
})
};
fetch('https://api-eu.cybedefend.com/organization/{organizationId}/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-eu.cybedefend.com/organization/{organizationId}/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([
'email' => 'jsmith@example.com',
'teamAssignments' => [
[
'teamId' => '550e8400-e29b-41d4-a716-446655440000',
'role' => 'developer'
],
[
'teamId' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
'role' => 'team_manager'
]
]
]),
CURLOPT_HTTPHEADER => [
"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-eu.cybedefend.com/organization/{organizationId}/invite"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"teamAssignments\": [\n {\n \"teamId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"role\": \"developer\"\n },\n {\n \"teamId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"role\": \"team_manager\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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-eu.cybedefend.com/organization/{organizationId}/invite")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"teamAssignments\": [\n {\n \"teamId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"role\": \"developer\"\n },\n {\n \"teamId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"role\": \"team_manager\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/organization/{organizationId}/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"teamAssignments\": [\n {\n \"teamId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"role\": \"developer\"\n },\n {\n \"teamId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\",\n \"role\": \"team_manager\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>",
"email": "<string>",
"status": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationName": "<string>",
"organizationRole": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}Path Parameters
Organization identifier
Body
application/json
Email of the person invited
Role to assign
Available options:
administrator, manager, billing_manager, member Array of team assignments with roles for automatic addition upon invitation acceptance
Show child attributes
Show child attributes
Example:
[
{
"teamId": "550e8400-e29b-41d4-a716-446655440000",
"role": "developer"
},
{
"teamId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"role": "team_manager"
}
]
Response
User invited to organization
Invitation unique identifier
Invitation token
Email of the invitee
Current status of the invitation
Organization unique identifier
Organization name
Role in the organization
Invitation expiration date
⌘I