curl --request POST \
--url https://app.textql.com/v2/connectors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
}
}
'import requests
url = "https://app.textql.com/v2/connectors"
payload = { "config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
} }
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({
config: {connector_type: 'POSTGRES', name: '<string>', auth_strategy: '<string>'}
})
};
fetch('https://app.textql.com/v2/connectors', 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://app.textql.com/v2/connectors",
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([
'config' => [
'connector_type' => 'POSTGRES',
'name' => '<string>',
'auth_strategy' => '<string>'
]
]),
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://app.textql.com/v2/connectors"
payload := strings.NewReader("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n }\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://app.textql.com/v2/connectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/v2/connectors")
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 \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"type": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body"
}
}{
"error": {
"code": "unauthenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "permission_denied",
"message": "Insufficient permissions"
}
}{
"error": {
"code": "conflict",
"message": "A connector already exists for this account"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal",
"message": "Internal server error"
}
}Create Connector
Create a new data connector
curl --request POST \
--url https://app.textql.com/v2/connectors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
}
}
'import requests
url = "https://app.textql.com/v2/connectors"
payload = { "config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
} }
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({
config: {connector_type: 'POSTGRES', name: '<string>', auth_strategy: '<string>'}
})
};
fetch('https://app.textql.com/v2/connectors', 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://app.textql.com/v2/connectors",
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([
'config' => [
'connector_type' => 'POSTGRES',
'name' => '<string>',
'auth_strategy' => '<string>'
]
]),
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://app.textql.com/v2/connectors"
payload := strings.NewReader("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n }\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://app.textql.com/v2/connectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/v2/connectors")
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 \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"type": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body"
}
}{
"error": {
"code": "unauthenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "permission_denied",
"message": "Insufficient permissions"
}
}{
"error": {
"code": "conflict",
"message": "A connector already exists for this account"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal",
"message": "Internal server error"
}
}Authorizations
API key or JWT token
Body
A connector's type, display name, and type-specific connection metadata.
Set exactly one metadata field matching connector_type (e.g.
connector_type: POSTGRES ⇒ set postgres). The common database types
are documented below; every supported type follows the same shape — see
the proto ConnectorConfig for the full list (Snowflake, BigQuery,
Databricks, Tableau, PowerBI, SQL Server, Trino, etc.).
Confidential fields (passwords, keys, tokens) are write-only: they are never returned by read endpoints, and on update they are preserved from the stored connector when sent empty.
Show child attributes
Show child attributes
Access configuration applied atomically with creation. Grants are
validated before the connector is created, so an invalid grant
never leaves a partially configured connector. When omitted, the
connector is created org-visible (is_public: true). The creating
member always receives an owner grant.
Show child attributes
Show child attributes