Create Thread
curl --request POST \
--url https://be.datagol.ai/ai/api/v2/conversations \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"name": "Data Summary Request",
"agentType": "CustomAgent",
"uiMetadata": {
"type": "CustomAgent",
"parameters": {
"customAgentId": "1526da2b-3264-4118-b141-87857369b0bd"
},
"configuration": {
"llmModel": "gpt-5.2"
}
}
}
'import requests
url = "https://be.datagol.ai/ai/api/v2/conversations"
payload = {
"name": "Data Summary Request",
"agentType": "CustomAgent",
"uiMetadata": {
"type": "CustomAgent",
"parameters": { "customAgentId": "1526da2b-3264-4118-b141-87857369b0bd" },
"configuration": { "llmModel": "gpt-5.2" }
}
}
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Data Summary Request',
agentType: 'CustomAgent',
uiMetadata: {
type: 'CustomAgent',
parameters: {customAgentId: '1526da2b-3264-4118-b141-87857369b0bd'},
configuration: {llmModel: 'gpt-5.2'}
}
})
};
fetch('https://be.datagol.ai/ai/api/v2/conversations', 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://be.datagol.ai/ai/api/v2/conversations",
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' => 'Data Summary Request',
'agentType' => 'CustomAgent',
'uiMetadata' => [
'type' => 'CustomAgent',
'parameters' => [
'customAgentId' => '1526da2b-3264-4118-b141-87857369b0bd'
],
'configuration' => [
'llmModel' => 'gpt-5.2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <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://be.datagol.ai/ai/api/v2/conversations"
payload := strings.NewReader("{\n \"name\": \"Data Summary Request\",\n \"agentType\": \"CustomAgent\",\n \"uiMetadata\": {\n \"type\": \"CustomAgent\",\n \"parameters\": {\n \"customAgentId\": \"1526da2b-3264-4118-b141-87857369b0bd\"\n },\n \"configuration\": {\n \"llmModel\": \"gpt-5.2\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<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://be.datagol.ai/ai/api/v2/conversations")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Data Summary Request\",\n \"agentType\": \"CustomAgent\",\n \"uiMetadata\": {\n \"type\": \"CustomAgent\",\n \"parameters\": {\n \"customAgentId\": \"1526da2b-3264-4118-b141-87857369b0bd\"\n },\n \"configuration\": {\n \"llmModel\": \"gpt-5.2\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/ai/api/v2/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Data Summary Request\",\n \"agentType\": \"CustomAgent\",\n \"uiMetadata\": {\n \"type\": \"CustomAgent\",\n \"parameters\": {\n \"customAgentId\": \"1526da2b-3264-4118-b141-87857369b0bd\"\n },\n \"configuration\": {\n \"llmModel\": \"gpt-5.2\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope": "<string>",
"agentType": "<string>",
"active": true
}Conversations
Create Thread
Opens a new conversation session backed by a Custom Agent. Returns the conversationId required for the streaming endpoint.
POST
/
ai
/
api
/
v2
/
conversations
Create Thread
curl --request POST \
--url https://be.datagol.ai/ai/api/v2/conversations \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"name": "Data Summary Request",
"agentType": "CustomAgent",
"uiMetadata": {
"type": "CustomAgent",
"parameters": {
"customAgentId": "1526da2b-3264-4118-b141-87857369b0bd"
},
"configuration": {
"llmModel": "gpt-5.2"
}
}
}
'import requests
url = "https://be.datagol.ai/ai/api/v2/conversations"
payload = {
"name": "Data Summary Request",
"agentType": "CustomAgent",
"uiMetadata": {
"type": "CustomAgent",
"parameters": { "customAgentId": "1526da2b-3264-4118-b141-87857369b0bd" },
"configuration": { "llmModel": "gpt-5.2" }
}
}
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Data Summary Request',
agentType: 'CustomAgent',
uiMetadata: {
type: 'CustomAgent',
parameters: {customAgentId: '1526da2b-3264-4118-b141-87857369b0bd'},
configuration: {llmModel: 'gpt-5.2'}
}
})
};
fetch('https://be.datagol.ai/ai/api/v2/conversations', 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://be.datagol.ai/ai/api/v2/conversations",
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' => 'Data Summary Request',
'agentType' => 'CustomAgent',
'uiMetadata' => [
'type' => 'CustomAgent',
'parameters' => [
'customAgentId' => '1526da2b-3264-4118-b141-87857369b0bd'
],
'configuration' => [
'llmModel' => 'gpt-5.2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <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://be.datagol.ai/ai/api/v2/conversations"
payload := strings.NewReader("{\n \"name\": \"Data Summary Request\",\n \"agentType\": \"CustomAgent\",\n \"uiMetadata\": {\n \"type\": \"CustomAgent\",\n \"parameters\": {\n \"customAgentId\": \"1526da2b-3264-4118-b141-87857369b0bd\"\n },\n \"configuration\": {\n \"llmModel\": \"gpt-5.2\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<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://be.datagol.ai/ai/api/v2/conversations")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Data Summary Request\",\n \"agentType\": \"CustomAgent\",\n \"uiMetadata\": {\n \"type\": \"CustomAgent\",\n \"parameters\": {\n \"customAgentId\": \"1526da2b-3264-4118-b141-87857369b0bd\"\n },\n \"configuration\": {\n \"llmModel\": \"gpt-5.2\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/ai/api/v2/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Data Summary Request\",\n \"agentType\": \"CustomAgent\",\n \"uiMetadata\": {\n \"type\": \"CustomAgent\",\n \"parameters\": {\n \"customAgentId\": \"1526da2b-3264-4118-b141-87857369b0bd\"\n },\n \"configuration\": {\n \"llmModel\": \"gpt-5.2\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scope": "<string>",
"agentType": "<string>",
"active": true
}Authorizations
ServiceAccountAuthBearerAuth
For server-to-server or automated access, use a DataGOL Service Account key.
Pass it via the x-auth-token header instead of Authorization:
x-auth-token: <service-account-key>
Body
application/json
⌘I