Create Connection Invite Token
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",
"identifier": "<string>",
"options": {
"oauth2_redirect_urls": {
"success": "<string>",
"error": "<string>"
}
},
"expiry_secs": 1800
}
'import requests
url = "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens"
payload = {
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"options": { "oauth2_redirect_urls": {
"success": "<string>",
"error": "<string>"
} },
"expiry_secs": 1800
}
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',
identifier: '<string>',
options: {oauth2_redirect_urls: {success: '<string>', error: '<string>'}},
expiry_secs: 1800
})
};
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',
'identifier' => '<string>',
'options' => [
'oauth2_redirect_urls' => [
'success' => '<string>',
'error' => '<string>'
]
],
'expiry_secs' => 1800
]),
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 \"identifier\": \"<string>\",\n \"options\": {\n \"oauth2_redirect_urls\": {\n \"success\": \"<string>\",\n \"error\": \"<string>\"\n }\n },\n \"expiry_secs\": 1800\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 \"identifier\": \"<string>\",\n \"options\": {\n \"oauth2_redirect_urls\": {\n \"success\": \"<string>\",\n \"error\": \"<string>\"\n }\n },\n \"expiry_secs\": 1800\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 \"identifier\": \"<string>\",\n \"options\": {\n \"oauth2_redirect_urls\": {\n \"success\": \"<string>\",\n \"error\": \"<string>\"\n }\n },\n \"expiry_secs\": 1800\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}OnRamp
Create Connection Invite Token
Create a one-time use connection invite token for an Organization.
POST
/
provisioning
/
organizations
/
{organization_id}
/
connection-invite-tokens
Create Connection Invite Token
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",
"identifier": "<string>",
"options": {
"oauth2_redirect_urls": {
"success": "<string>",
"error": "<string>"
}
},
"expiry_secs": 1800
}
'import requests
url = "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connection-invite-tokens"
payload = {
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"options": { "oauth2_redirect_urls": {
"success": "<string>",
"error": "<string>"
} },
"expiry_secs": 1800
}
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',
identifier: '<string>',
options: {oauth2_redirect_urls: {success: '<string>', error: '<string>'}},
expiry_secs: 1800
})
};
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',
'identifier' => '<string>',
'options' => [
'oauth2_redirect_urls' => [
'success' => '<string>',
'error' => '<string>'
]
],
'expiry_secs' => 1800
]),
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 \"identifier\": \"<string>\",\n \"options\": {\n \"oauth2_redirect_urls\": {\n \"success\": \"<string>\",\n \"error\": \"<string>\"\n }\n },\n \"expiry_secs\": 1800\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 \"identifier\": \"<string>\",\n \"options\": {\n \"oauth2_redirect_urls\": {\n \"success\": \"<string>\",\n \"error\": \"<string>\"\n }\n },\n \"expiry_secs\": 1800\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 \"identifier\": \"<string>\",\n \"options\": {\n \"oauth2_redirect_urls\": {\n \"success\": \"<string>\",\n \"error\": \"<string>\"\n }\n },\n \"expiry_secs\": 1800\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
Vendor for which the connection token is being created
Available options:
SEMGREP, SENTINELONE_VMS, SENTINELONE, AIKIDO, ORCA, AWS_INSPECTOR2, AWS_ACCESS_ANALYSER, AWS_SECURITYHUB, INSIGHTVM, MS_DEFENDER_VMS, MS_ENTRA, MS_DEFENDER_VMS_GCC_HIGH, MS_DEFENDER_CLOUD, MS_DEFENDER_ENDPOINT, JIRA, QUALYS, GITHUB, ARNICA, SNYK, TANIUM_VMS, GITLAB, MEND, SERVICENOW, UPWIND, TENABLE, CHECKMARX, CROWDSTRIKE_SPOTLIGHT, CROWDSTRIKE, BLACK_KITE, BIT_SIGHT, LACEWORK_CSPM, WIZ_VMS, WIZ_CODE, OKTA_IDP Connection ID for the connection to be updated
Identifier for the connection to be created or updated with this token
options
SnykConnectionOptions · SnykConnectionOptions · objectMSDefenderEndpointConnectionOptions · MSDefenderEndpointConnectionOptions · objectMSDefenderVMSConnectionOptions · MSDefenderVMSConnectionOptions · objectUpwindConnectionOptions · UpwindConnectionOptions · objectTaniumVMSOptions · TaniumVMSOptions · objectQualysConnectionOptions · QualysConnectionOptions · objectSentinelOneEDROptions · SentinelOneEDROptions · objectSentinelOneVMSOptions · SentinelOneVMSOptions · objectCrowdStrikeConnectionOptions · CrowdStrikeConnectionOptions · objectCrowdStrikeSpotlightConnectionOptions · CrowdStrikeSpotlightConnectionOptions · objectCheckmarxConnectionOptions · CheckmarxConnectionOptions · objectGitlabOptions · GitlabOptions · objectMendConnectionOptions · MendConnectionOptions · objectInsightVMConnectionOptions · InsightVMConnectionOptions · objectProcessUnityConnectionOptions · ProcessUnityConnectionOptions · objectSemgrepOptions · SemgrepOptions · objectWizCodeOptions · WizCodeOptions · objectWizVMSOptions · WizVMSOptions · objectAikidoConnectionOptions · AikidoConnectionOptions · objectTenableConnectionOptions · TenableConnectionOptions · objectSnykConnectionOptions · SnykConnectionOptions · objectBlackKiteConnectionOptions · BlackKiteConnectionOptions · objectJiraConnectionOptions · JiraConnectionOptions · objectGitHubConnectionOptions · GitHubConnectionOptions · objectOktaIDPOptions · OktaIDPOptions · objectAwsSecurityHubOptions · AwsSecurityHubOptions · objectAwsInspector2Options · AwsInspector2Options · objectAwsAccessAnalyzerOptions · AwsAccessAnalyzerOptions · objectLaceworkCSPMOptions · LaceworkCSPMOptions · objectOptions · anyBitSightConnectionOptions · BitSightConnectionOptions · objectArnicaConnectionOptions · ArnicaConnectionOptions · objectSecurityScorecardConnectionOptions · SecurityScorecardConnectionOptions · objectMSDefenderEndpointConnectionOptions · MSDefenderEndpointConnectionOptions · objectMSEntraConnectionOptions · MSEntraConnectionOptions · objectMSDefenderVMSConnectionOptions · MSDefenderVMSConnectionOptions · objectMSDefenderVMSGccHighConnectionOptions · MSDefenderVMSGccHighConnectionOptions · objectMSDefenderCloudConnectionOptions · MSDefenderCloudConnectionOptions · objectOrcaConnectionOptions · OrcaConnectionOptions · object
Connection options, ONLY used for Oauth2 URL overrides for Snyk and MS Defender Endpoint and auth_type for AWS connectors and Snyk
Show child attributes
Show child attributes
Connection token expiry in seconds, default 30 minutes
Response
Successful Response
⌘I