curl --request POST \
--url https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_secs": 1800,
"identifier": "<string>",
"options": {
"auth_type": "SECRETS",
"external_use_only": false,
"refresh_intervals": {}
},
"source_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens"
payload = {
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_secs": 1800,
"identifier": "<string>",
"options": {
"auth_type": "SECRETS",
"external_use_only": False,
"refresh_intervals": {}
},
"source_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expiry_secs: 1800,
identifier: '<string>',
options: {auth_type: 'SECRETS', external_use_only: false, refresh_intervals: {}},
source_connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens', 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.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens",
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([
'connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expiry_secs' => 1800,
'identifier' => '<string>',
'options' => [
'auth_type' => 'SECRETS',
'external_use_only' => false,
'refresh_intervals' => [
]
],
'source_connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens"
payload := strings.NewReader("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_secs\": 1800,\n \"identifier\": \"<string>\",\n \"options\": {\n \"auth_type\": \"SECRETS\",\n \"external_use_only\": false,\n \"refresh_intervals\": {}\n },\n \"source_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_secs\": 1800,\n \"identifier\": \"<string>\",\n \"options\": {\n \"auth_type\": \"SECRETS\",\n \"external_use_only\": false,\n \"refresh_intervals\": {}\n },\n \"source_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_secs\": 1800,\n \"identifier\": \"<string>\",\n \"options\": {\n \"auth_type\": \"SECRETS\",\n \"external_use_only\": false,\n \"refresh_intervals\": {}\n },\n \"source_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Create Connection Invite Token
Create a one-time use connection invite token for an Organization.
curl --request POST \
--url https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_secs": 1800,
"identifier": "<string>",
"options": {
"auth_type": "SECRETS",
"external_use_only": false,
"refresh_intervals": {}
},
"source_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens"
payload = {
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_secs": 1800,
"identifier": "<string>",
"options": {
"auth_type": "SECRETS",
"external_use_only": False,
"refresh_intervals": {}
},
"source_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expiry_secs: 1800,
identifier: '<string>',
options: {auth_type: 'SECRETS', external_use_only: false, refresh_intervals: {}},
source_connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens', 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.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens",
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([
'connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expiry_secs' => 1800,
'identifier' => '<string>',
'options' => [
'auth_type' => 'SECRETS',
'external_use_only' => false,
'refresh_intervals' => [
]
],
'source_connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens"
payload := strings.NewReader("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_secs\": 1800,\n \"identifier\": \"<string>\",\n \"options\": {\n \"auth_type\": \"SECRETS\",\n \"external_use_only\": false,\n \"refresh_intervals\": {}\n },\n \"source_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_secs\": 1800,\n \"identifier\": \"<string>\",\n \"options\": {\n \"auth_type\": \"SECRETS\",\n \"external_use_only\": false,\n \"refresh_intervals\": {}\n },\n \"source_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_secs\": 1800,\n \"identifier\": \"<string>\",\n \"options\": {\n \"auth_type\": \"SECRETS\",\n \"external_use_only\": false,\n \"refresh_intervals\": {}\n },\n \"source_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Path Parameters
Body
Connection ID for the connection to be updated
Connection token expiry in seconds, default 30 minutes
Identifier for the connection to be created or updated with this token
Connection options, ONLY used for Oauth2 URL overrides for Snyk and MS Defender Endpoint, and auth_type for AWS connectors, Snyk, MS Defender Endpoint and MS Defender Vulnerability Management
- AikidoConnectionOptions
- ArnicaConnectionOptions
- AwsAccessAnalyzerOptions
- AwsGuardDutyOptions
- AwsInspector2Options
- AwsSecurityHubOptions
- BitSightConnectionOptions
- BlackDuckConnectionOptions
- BlackDuckSCAConnectionOptions
- BlackKiteConnectionOptions
- CheckmarxConnectionOptions
- CrowdStrikeConnectionOptions
- CrowdStrikeSpotlightConnectionOptions
- GitHubConnectionOptions
- GitlabOptions
- HeelerOptions
- InsightVMConnectionOptions
- JiraConnectionOptions
- LaceworkCSPMOptions
- MendConnectionOptions
- MSDefenderCloudConnectionOptions
- MSDefenderEndpointConnectionOptions
- MSDefenderVMSConnectionOptions
- MSDefenderVMSGccHighConnectionOptions
- MSEntraConnectionOptions
- MSIntuneConnectionOptions
- OktaIDPOptions
- OrcaConnectionOptions
- ProcessUnityConnectionOptions
- ProofPointOptions
- QualysConnectionOptions
- SecurityScorecardConnectionOptions
- SemgrepOptions
- SentinelOneEDROptions
- SentinelOneVMSOptions
- ServiceNowGRCConnectionOptions
- ServiceNowITSMConnectionOptions
- ServiceNowVROptions
- SnykConnectionOptions
- SocketOptions
- SonarQubeConnectionOptions
- TaniumVMSOptions
- TenableConnectionOptions
- UpwindConnectionOptions
- WizCodeOptions
- WizCSPMOptions
- WizVMSOptions
Show child attributes
Show child attributes
For a destination vendor only (pull or push): binds this token to a specific SOURCE connection, so the resulting connection can only be created with a matching source_connection_id. Distinct from connection_id, which means 'update this existing connection' — never both set.
Vendor for which the connection token is being created
AIKIDO, ARNICA, AWS_ACCESS_ANALYSER, AWS_GUARDDUTY, AWS_INSPECTOR2, AWS_SECURITYHUB, BIT_SIGHT, BLACK_DUCK_COVERITY, BLACK_DUCK_SCA, BLACK_KITE, CHECKMARX, CROWDSTRIKE, CROWDSTRIKE_SPOTLIGHT, GITHUB, GITLAB, HEELER, INSIGHTVM, JIRA, LACEWORK_CSPM, MEND, MS_DEFENDER_CLOUD, MS_DEFENDER_ENDPOINT, MS_DEFENDER_VMS, MS_DEFENDER_VMS_GCC_HIGH, MS_ENTRA, MS_INTUNE, OKTA_IDP, ORCA, PROCESSUNITY, PROOFPOINT_TAP, QUALYS, SECURITY_SCORECARD, SEMGREP, SENTINELONE, SENTINELONE_VMS, SERVICENOW, SERVICENOW_ITSM, SERVICENOW_VR, SNYK, SOCKET, SONARQUBE, TANIUM_VMS, TENABLE, UPWIND, WIZ_CODE, WIZ_CSPM, WIZ_VMS Response
Successful Response
The token to hand to whoever will authorise the connection. Shown once, at creation; it cannot be read back afterwards.