from engini import Engini
client = Engini() # reads ENGINI_API_KEY
# authentication_id comes from the application's authentication methods
connection = client.connections.create(
"slack", "Sales", 2, {"token": "xoxb-your-bot-token"}
)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
// authenticationId comes from the application's authentication methods
const connection = await client.connections.create(
"slack", "Sales", 2, { token: "xoxb-your-bot-token" },
);engini connections create slack --auth 2 --name Sales --field token=xoxb-your-bot-tokenconst options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
applicationSlug: 'example-app',
connectionName: 'My Example Connection',
authenticationId: 1,
fields: {apiKey: 'eng_example1234567890'}
})
};
fetch('https://api.engini.io/v1/connections', 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.engini.io/v1/connections",
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([
'applicationSlug' => 'example-app',
'connectionName' => 'My Example Connection',
'authenticationId' => 1,
'fields' => [
'apiKey' => 'eng_example1234567890'
]
]),
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://api.engini.io/v1/connections"
payload := strings.NewReader("{\n \"applicationSlug\": \"example-app\",\n \"connectionName\": \"My Example Connection\",\n \"authenticationId\": 1,\n \"fields\": {\n \"apiKey\": \"eng_example1234567890\"\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://api.engini.io/v1/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"applicationSlug\": \"example-app\",\n \"connectionName\": \"My Example Connection\",\n \"authenticationId\": 1,\n \"fields\": {\n \"apiKey\": \"eng_example1234567890\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections")
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 \"applicationSlug\": \"example-app\",\n \"connectionName\": \"My Example Connection\",\n \"authenticationId\": 1,\n \"fields\": {\n \"apiKey\": \"eng_example1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body{
"connectionId": 123,
"connectionName": "My Example Connection",
"description": null,
"applicationSlug": "example-app",
"applicationName": "Example App",
"applicationLogo": "https://example.com/logo.png",
"isPublic": false,
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdDate": "2026-01-01T00:00:00Z"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Create connection
Creates a new connection for the caller’s account using the given field values (e.g. API key, credentials) for the target application. authenticationId selects which of the application’s authentication methods to use; omit it to use the application’s default. To connect via OAuth instead of directly supplying credentials, use POST /connections/get-sign-in-url followed by GET /connections/access-token/.
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
# authentication_id comes from the application's authentication methods
connection = client.connections.create(
"slack", "Sales", 2, {"token": "xoxb-your-bot-token"}
)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
// authenticationId comes from the application's authentication methods
const connection = await client.connections.create(
"slack", "Sales", 2, { token: "xoxb-your-bot-token" },
);engini connections create slack --auth 2 --name Sales --field token=xoxb-your-bot-tokenconst options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
applicationSlug: 'example-app',
connectionName: 'My Example Connection',
authenticationId: 1,
fields: {apiKey: 'eng_example1234567890'}
})
};
fetch('https://api.engini.io/v1/connections', 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.engini.io/v1/connections",
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([
'applicationSlug' => 'example-app',
'connectionName' => 'My Example Connection',
'authenticationId' => 1,
'fields' => [
'apiKey' => 'eng_example1234567890'
]
]),
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://api.engini.io/v1/connections"
payload := strings.NewReader("{\n \"applicationSlug\": \"example-app\",\n \"connectionName\": \"My Example Connection\",\n \"authenticationId\": 1,\n \"fields\": {\n \"apiKey\": \"eng_example1234567890\"\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://api.engini.io/v1/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"applicationSlug\": \"example-app\",\n \"connectionName\": \"My Example Connection\",\n \"authenticationId\": 1,\n \"fields\": {\n \"apiKey\": \"eng_example1234567890\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections")
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 \"applicationSlug\": \"example-app\",\n \"connectionName\": \"My Example Connection\",\n \"authenticationId\": 1,\n \"fields\": {\n \"apiKey\": \"eng_example1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body{
"connectionId": 123,
"connectionName": "My Example Connection",
"description": null,
"applicationSlug": "example-app",
"applicationName": "Example App",
"applicationLogo": "https://example.com/logo.png",
"isPublic": false,
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdDate": "2026-01-01T00:00:00Z"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Query Parameters
Only for an OAuth2 client-credentials (no sign-in) method: the auth provider whose client the connection uses. Omit it for the account's default provider, pass 0 for the connector's own client. Ignored for every other method, where the provider is chosen on get-sign-in-url.
Body
The connection creation payload, including the connection name and application slug.
Request body for creating a connection.
Workspace to create the connection in. Not yet honoured (until the release that enforces scope on writes): it is accepted so clients can start sending it, and a create lands where a create with no pair lands today. The response's workspace and environment show where it landed. Name both this and EnvironmentId, or neither.
Response
The newly created connection.
Public-shape detail for /v1/Connections/{id} and create/update responses.