Skip to main content
POST
/
v1
/
tools
/
connectors
/
{connector_id}
/
connect
Connect Connector
curl --request POST \
  --url https://api.xpander.ai/v1/tools/connectors/{connector_id}/connect \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "version": "<string>",
  "security": {},
  "general_params": [],
  "headers": {},
  "target_system_servers": [],
  "access_scope": "personal",
  "is_service_account": false
}
'
import requests

url = "https://api.xpander.ai/v1/tools/connectors/{connector_id}/connect"

payload = {
"name": "<string>",
"version": "<string>",
"security": {},
"general_params": [],
"headers": {},
"target_system_servers": [],
"access_scope": "personal",
"is_service_account": False
}
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({
name: '<string>',
version: '<string>',
security: {},
general_params: [],
headers: {},
target_system_servers: [],
access_scope: 'personal',
is_service_account: false
})
};

fetch('https://api.xpander.ai/v1/tools/connectors/{connector_id}/connect', 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.xpander.ai/v1/tools/connectors/{connector_id}/connect",
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([
'name' => '<string>',
'version' => '<string>',
'security' => [

],
'general_params' => [

],
'headers' => [

],
'target_system_servers' => [

],
'access_scope' => 'personal',
'is_service_account' => false
]),
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.xpander.ai/v1/tools/connectors/{connector_id}/connect"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"security\": {},\n \"general_params\": [],\n \"headers\": {},\n \"target_system_servers\": [],\n \"access_scope\": \"personal\",\n \"is_service_account\": false\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.xpander.ai/v1/tools/connectors/{connector_id}/connect")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"security\": {},\n \"general_params\": [],\n \"headers\": {},\n \"target_system_servers\": [],\n \"access_scope\": \"personal\",\n \"is_service_account\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.xpander.ai/v1/tools/connectors/{connector_id}/connect")

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 \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"security\": {},\n \"general_params\": [],\n \"headers\": {},\n \"target_system_servers\": [],\n \"access_scope\": \"personal\",\n \"is_service_account\": false\n}"

response = http.request(request)
puts response.read_body
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

connector_id
string
required

Body

application/json

Request model for creating a new connection to a connector.

A connection binds a connector to your organization with specific authentication credentials and settings. The security and headers fields are write-only — they are accepted on create but never returned in any response for security reasons.

For OAuth2 connectors, the API may return an oauth2_required response with a URL to complete browser-based authentication.

name
string
required

Human-readable name for this connection. Must be descriptive enough to distinguish from other connections to the same connector (e.g., 'Production Slack', 'Staging Jira').

version
string | null

Pin this connection to a specific connector version. Leave None to use the connector's latest version.

security
Security · object | null

Authentication credentials for this connection (WRITE-ONLY — never returned in responses). Structure depends on the connector's auth type: API key auth: {'authMethod': 'apiKey', 'apiKey': '...', 'headerName': 'X-API-Key'}. OAuth2: {'authMethod': 'oauth2', 'oauth2Token': {...}}.

general_params
GeneralParam · object[] | null

Pre-filled parameters applied to all operations through this connection. Useful for setting common path/query/header params like workspace IDs or API versions.

headers
Headers · object | null

Custom HTTP headers to include in all API calls through this connection (WRITE-ONLY — never returned in responses). Used for additional authentication or routing headers.

target_system_servers
Target System Servers · object[] | null

Override the connector's default server URLs. Each entry should have a 'url' field and optional 'description'. Use this to point the connection at a different environment (e.g., staging vs production).

access_scope
string | null
default:personal

Who can use this connection. 'personal' (default) restricts to the creating user. 'organizational' makes it available to all org members.

is_service_account
boolean | null
default:false

Set to True if this connection uses shared service account credentials rather than personal user credentials. Only meaningful with 'organizational' access scope.

Response

Successful Response