Create Chat
curl --request POST \
--url https://app.splox.io/api/v1/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Support Chat",
"resource_type": "api",
"resource_id": "0199e001-a23b-7c8d-1234-567890abcdef"
}
'import requests
url = "https://app.splox.io/api/v1/chats"
payload = {
"name": "Support Chat",
"resource_type": "api",
"resource_id": "0199e001-a23b-7c8d-1234-567890abcdef"
}
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({
name: 'Support Chat',
resource_type: 'api',
resource_id: '0199e001-a23b-7c8d-1234-567890abcdef'
})
};
fetch('https://app.splox.io/api/v1/chats', 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.splox.io/api/v1/chats",
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' => 'Support Chat',
'resource_type' => 'api',
'resource_id' => '0199e001-a23b-7c8d-1234-567890abcdef'
]),
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.splox.io/api/v1/chats"
payload := strings.NewReader("{\n \"name\": \"Support Chat\",\n \"resource_type\": \"api\",\n \"resource_id\": \"0199e001-a23b-7c8d-1234-567890abcdef\"\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.splox.io/api/v1/chats")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Support Chat\",\n \"resource_type\": \"api\",\n \"resource_id\": \"0199e001-a23b-7c8d-1234-567890abcdef\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.splox.io/api/v1/chats")
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 \"name\": \"Support Chat\",\n \"resource_type\": \"api\",\n \"resource_id\": \"0199e001-a23b-7c8d-1234-567890abcdef\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_id": "<string>",
"is_public": true,
"public_share_token": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Chats
Create Chat
Creates a new chat session for a workflow or other resource. The chat ID is required when running workflows via the API.
POST
/
chats
Create Chat
curl --request POST \
--url https://app.splox.io/api/v1/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Support Chat",
"resource_type": "api",
"resource_id": "0199e001-a23b-7c8d-1234-567890abcdef"
}
'import requests
url = "https://app.splox.io/api/v1/chats"
payload = {
"name": "Support Chat",
"resource_type": "api",
"resource_id": "0199e001-a23b-7c8d-1234-567890abcdef"
}
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({
name: 'Support Chat',
resource_type: 'api',
resource_id: '0199e001-a23b-7c8d-1234-567890abcdef'
})
};
fetch('https://app.splox.io/api/v1/chats', 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.splox.io/api/v1/chats",
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' => 'Support Chat',
'resource_type' => 'api',
'resource_id' => '0199e001-a23b-7c8d-1234-567890abcdef'
]),
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.splox.io/api/v1/chats"
payload := strings.NewReader("{\n \"name\": \"Support Chat\",\n \"resource_type\": \"api\",\n \"resource_id\": \"0199e001-a23b-7c8d-1234-567890abcdef\"\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.splox.io/api/v1/chats")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Support Chat\",\n \"resource_type\": \"api\",\n \"resource_id\": \"0199e001-a23b-7c8d-1234-567890abcdef\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.splox.io/api/v1/chats")
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 \"name\": \"Support Chat\",\n \"resource_type\": \"api\",\n \"resource_id\": \"0199e001-a23b-7c8d-1234-567890abcdef\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_id": "<string>",
"is_public": true,
"public_share_token": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Creates a new chat session. A chat is required before running a workflow via the API — the chat ID is passed to
POST /workflow-requests/run.
Usage
curl -X POST https://app.splox.io/api/v1/chats \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Chat Session",
"resource_type": "api",
"resource_id": "0199e001-a23b-7c8d-1234-567890abcdef"
}'
from splox import SploxClient
client = SploxClient(api_key="YOUR_API_KEY")
chat = client.chats.create(
name="My Chat Session",
resource_id="0199e001-a23b-7c8d-1234-567890abcdef",
)
print(chat.id)
import Splox from "splox";
const client = new Splox("YOUR_API_KEY");
const chat = await client.chats.create({
name: "My Chat Session",
resource_id: "0199e001-a23b-7c8d-1234-567890abcdef",
});
console.log(chat.id);
client := splox.NewClient("YOUR_API_KEY")
chat, err := client.Chats.Create(ctx, splox.CreateChatParams{
Name: "My Chat Session",
ResourceID: "0199e001-a23b-7c8d-1234-567890abcdef",
})
fmt.Println(chat.ID)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the chat session |
resource_type | string | Yes | Must be api |
resource_id | string | Yes | ID of the resource (workflow ID, agent ID, etc.) |
metadata | object | No | Optional metadata |
Response
{
"id": "0199f200-a11b-7c8d-4444-888890abcdef",
"name": "My Chat Session",
"user_id": "0199d001-c45d-9e0f-3456-789012cdef01",
"resource_type": "workflow",
"resource_id": "0199e001-a23b-7c8d-1234-567890abcdef",
"is_public": false,
"created_at": "2025-10-22T10:00:00Z",
"updated_at": "2025-10-22T10:00:00Z"
}
Notes
Authentication required: The chat is automatically associated with the authenticated user.
Authorizations
API token generated from your Splox account settings. Create tokens at https://app.splox.io/account?tab=settings
Body
application/json
Response
201 - application/json
Chat created successfully
⌘I

