Create or replace a connected source
curl --request PUT \
--url https://api.sixtyfour.ai/connections/{name} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"base_url": "https://api.crm.example.com/v2",
"secret": "YOUR_READ_ONLY_KEY",
"description": "Our CRM: accounts, contacts and deal notes",
"allowed_requests": [
"POST /search"
]
}
'import requests
url = "https://api.sixtyfour.ai/connections/{name}"
payload = {
"base_url": "https://api.crm.example.com/v2",
"secret": "YOUR_READ_ONLY_KEY",
"description": "Our CRM: accounts, contacts and deal notes",
"allowed_requests": ["POST /search"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: 'https://api.crm.example.com/v2',
secret: 'YOUR_READ_ONLY_KEY',
description: 'Our CRM: accounts, contacts and deal notes',
allowed_requests: ['POST /search']
})
};
fetch('https://api.sixtyfour.ai/connections/{name}', 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.sixtyfour.ai/connections/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => 'https://api.crm.example.com/v2',
'secret' => 'YOUR_READ_ONLY_KEY',
'description' => 'Our CRM: accounts, contacts and deal notes',
'allowed_requests' => [
'POST /search'
]
]),
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.sixtyfour.ai/connections/{name}"
payload := strings.NewReader("{\n \"base_url\": \"https://api.crm.example.com/v2\",\n \"secret\": \"YOUR_READ_ONLY_KEY\",\n \"description\": \"Our CRM: accounts, contacts and deal notes\",\n \"allowed_requests\": [\n \"POST /search\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sixtyfour.ai/connections/{name}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://api.crm.example.com/v2\",\n \"secret\": \"YOUR_READ_ONLY_KEY\",\n \"description\": \"Our CRM: accounts, contacts and deal notes\",\n \"allowed_requests\": [\n \"POST /search\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/connections/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"https://api.crm.example.com/v2\",\n \"secret\": \"YOUR_READ_ONLY_KEY\",\n \"description\": \"Our CRM: accounts, contacts and deal notes\",\n \"allowed_requests\": [\n \"POST /search\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "6f1c2a9e-4b7d-4e3a-9c5f-2d8e1b0a7c43",
"name": "crm",
"description": "Our CRM: accounts, contacts and deal notes",
"base_url": "https://api.crm.example.com/v2",
"sign_in": {
"type": "bearer",
"name": null
},
"allowed_requests": [
"POST /search"
],
"secret_last4": "_KEY",
"created_at": "2026-11-05T03:40:00Z",
"updated_at": "2026-11-05T03:40:00Z",
"created": true
}{
"detail": "Invalid request body",
"code": "bad_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Invalid API key",
"code": "unauthenticated",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "This organization no longer has access to Sixtyfour. Contact your representative at Sixtyfour.",
"code": "forbidden",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
],
"code": "invalid_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Rate limit exceeded: 60 requests per minute. Retry after 1 second.",
"code": "rate_limited",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Internal server error",
"code": "internal_error",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Could not verify the API key right now. Retry shortly.",
"code": "unavailable",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}Connections
Create or replace a connected source
Create the connection name, or replace its settings and, when secret is given, its secret. Only
base_url and secret are required. Runs already going read the change at their next call.
PUT
/
connections
/
{name}
Create or replace a connected source
curl --request PUT \
--url https://api.sixtyfour.ai/connections/{name} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"base_url": "https://api.crm.example.com/v2",
"secret": "YOUR_READ_ONLY_KEY",
"description": "Our CRM: accounts, contacts and deal notes",
"allowed_requests": [
"POST /search"
]
}
'import requests
url = "https://api.sixtyfour.ai/connections/{name}"
payload = {
"base_url": "https://api.crm.example.com/v2",
"secret": "YOUR_READ_ONLY_KEY",
"description": "Our CRM: accounts, contacts and deal notes",
"allowed_requests": ["POST /search"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: 'https://api.crm.example.com/v2',
secret: 'YOUR_READ_ONLY_KEY',
description: 'Our CRM: accounts, contacts and deal notes',
allowed_requests: ['POST /search']
})
};
fetch('https://api.sixtyfour.ai/connections/{name}', 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.sixtyfour.ai/connections/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => 'https://api.crm.example.com/v2',
'secret' => 'YOUR_READ_ONLY_KEY',
'description' => 'Our CRM: accounts, contacts and deal notes',
'allowed_requests' => [
'POST /search'
]
]),
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.sixtyfour.ai/connections/{name}"
payload := strings.NewReader("{\n \"base_url\": \"https://api.crm.example.com/v2\",\n \"secret\": \"YOUR_READ_ONLY_KEY\",\n \"description\": \"Our CRM: accounts, contacts and deal notes\",\n \"allowed_requests\": [\n \"POST /search\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sixtyfour.ai/connections/{name}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://api.crm.example.com/v2\",\n \"secret\": \"YOUR_READ_ONLY_KEY\",\n \"description\": \"Our CRM: accounts, contacts and deal notes\",\n \"allowed_requests\": [\n \"POST /search\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sixtyfour.ai/connections/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"https://api.crm.example.com/v2\",\n \"secret\": \"YOUR_READ_ONLY_KEY\",\n \"description\": \"Our CRM: accounts, contacts and deal notes\",\n \"allowed_requests\": [\n \"POST /search\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "6f1c2a9e-4b7d-4e3a-9c5f-2d8e1b0a7c43",
"name": "crm",
"description": "Our CRM: accounts, contacts and deal notes",
"base_url": "https://api.crm.example.com/v2",
"sign_in": {
"type": "bearer",
"name": null
},
"allowed_requests": [
"POST /search"
],
"secret_last4": "_KEY",
"created_at": "2026-11-05T03:40:00Z",
"updated_at": "2026-11-05T03:40:00Z",
"created": true
}{
"detail": "Invalid request body",
"code": "bad_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Invalid API key",
"code": "unauthenticated",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "This organization no longer has access to Sixtyfour. Contact your representative at Sixtyfour.",
"code": "forbidden",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": [
{
"loc": [
"body",
"target_company",
"domain"
],
"msg": "Field required",
"type": "missing",
"input": null,
"ctx": {}
}
],
"code": "invalid_request",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Rate limit exceeded: 60 requests per minute. Retry after 1 second.",
"code": "rate_limited",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Internal server error",
"code": "internal_error",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}{
"detail": "Could not verify the API key right now. Retry shortly.",
"code": "unavailable",
"correlation_id": "enrich_3f8b2c1e-9d4a-4c1b-8e2f-6a7b5c4d3e21",
"feedback": "Problem with this response? POST /feedback with comment and operation; include correlation_id in your comment."
}Body
application/json
Response
Successful Response
Was this page helpful?