curl --request POST \
--url https://release0.com/api/v1/agents/{publicId}/start \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"type": "text",
"text": "<string>",
"attachedFileUrls": [
"<string>"
]
},
"isStreamEnabled": false,
"resultId": "<string>",
"isOnlyRegistering": false,
"initialContext": {
"First name": "John",
"Email": "john@gmail.com"
},
"textBubbleContentFormat": "richText",
"request": "<unknown>"
}
'import requests
url = "https://release0.com/api/v1/agents/{publicId}/start"
payload = {
"message": {
"type": "text",
"text": "<string>",
"attachedFileUrls": ["<string>"]
},
"isStreamEnabled": False,
"resultId": "<string>",
"isOnlyRegistering": False,
"initialContext": {
"First name": "John",
"Email": "john@gmail.com"
},
"textBubbleContentFormat": "richText",
"request": "<unknown>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
message: {type: 'text', text: '<string>', attachedFileUrls: ['<string>']},
isStreamEnabled: false,
resultId: '<string>',
isOnlyRegistering: false,
initialContext: {'First name': 'John', Email: 'john@gmail.com'},
textBubbleContentFormat: 'richText',
request: '<unknown>'
})
};
fetch('https://release0.com/api/v1/agents/{publicId}/start', 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://release0.com/api/v1/agents/{publicId}/start",
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([
'message' => [
'type' => 'text',
'text' => '<string>',
'attachedFileUrls' => [
'<string>'
]
],
'isStreamEnabled' => false,
'resultId' => '<string>',
'isOnlyRegistering' => false,
'initialContext' => [
'First name' => 'John',
'Email' => 'john@gmail.com'
],
'textBubbleContentFormat' => 'richText',
'request' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"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://release0.com/api/v1/agents/{publicId}/start"
payload := strings.NewReader("{\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ]\n },\n \"isStreamEnabled\": false,\n \"resultId\": \"<string>\",\n \"isOnlyRegistering\": false,\n \"initialContext\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"textBubbleContentFormat\": \"richText\",\n \"request\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://release0.com/api/v1/agents/{publicId}/start")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ]\n },\n \"isStreamEnabled\": false,\n \"resultId\": \"<string>\",\n \"isOnlyRegistering\": false,\n \"initialContext\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"textBubbleContentFormat\": \"richText\",\n \"request\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://release0.com/api/v1/agents/{publicId}/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ]\n },\n \"isStreamEnabled\": false,\n \"resultId\": \"<string>\",\n \"isOnlyRegistering\": false,\n \"initialContext\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"textBubbleContentFormat\": \"richText\",\n \"request\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"sessionId": "<string>",
"agent": {
"id": "<string>",
"theme": {
"general": {
"font": "<string>",
"background": {
"type": "Color",
"content": "<string>"
},
"progressBar": {
"isEnabled": true,
"color": "<string>",
"backgroundColor": "<string>",
"placement": "Top",
"thickness": 123,
"position": "fixed"
}
},
"chat": {
"container": {
"maxWidth": "<string>",
"maxHeight": "<string>",
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"hostAvatar": {
"isEnabled": true,
"url": "<string>"
},
"guestAvatar": {
"isEnabled": true,
"url": "<string>"
},
"hostBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"guestBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"buttons": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"inputs": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
},
"placeholderColor": "<string>"
},
"roundness": "none",
"buttonsInput": {
"layout": "wrap"
}
},
"customCss": "<string>"
},
"settings": {
"general": {
"isBrandingEnabled": true,
"brandingText": "<string>",
"brandingUrl": "<string>",
"isTypingEmulationEnabled": true,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true,
"rememberUser": {
"isEnabled": true,
"storage": "session"
},
"expiration": {
"expiresAt": "<string>",
"expiredUrl": "<string>",
"expiredTitle": "<string>",
"expiredMessage": "<string>"
}
},
"typingEmulation": {
"enabled": true,
"speed": 123,
"maxDelay": 123,
"delayBetweenBubbles": 2.5,
"isDisabledOnFirstMessage": true
},
"metadata": {
"title": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"favIconUrl": "<string>",
"customHeadCode": "<string>",
"googleTagManagerId": "<string>"
},
"whatsApp": {
"isEnabled": true,
"startCondition": {
"logicalOperator": "OR",
"comparisons": [
{
"id": "<string>",
"comparisonOperator": "Equal to",
"value": "<string>"
}
]
},
"sessionExpiryTimeout": 24.005
},
"publicShare": {
"isEnabled": true
},
"security": {
"allowedOrigins": [
"<string>"
],
"password": "<string>"
}
},
"publishedAt": "<string>"
},
"messages": [
{
"id": "<string>",
"type": "text",
"content": {
"type": "richText",
"richText": "<unknown>"
}
}
],
"resultId": "<string>",
"lastMessageNewFormat": "<string>",
"input": {
"id": "<string>",
"type": "text input",
"outgoingEdgeId": "<string>",
"options": {
"labels": {
"placeholder": "<string>",
"button": "<string>"
},
"variableId": "<string>",
"isLong": true,
"isPassword": true,
"isRequired": true,
"audioClip": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
},
"attachments": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
}
},
"prefilledValue": "<string>",
"runtimeOptions": {
"paymentIntentSecret": "<string>",
"amountLabel": "<string>",
"publicKey": "<string>"
}
},
"clientSideActions": [
{
"type": "scriptToExecute",
"scriptToExecute": {
"content": "<string>",
"args": [
{
"id": "<string>",
"value": "<string>"
}
],
"isCode": true
},
"lastBubbleBlockId": "<string>",
"expectsDedicatedReply": true
}
],
"logs": [
{
"status": "<string>",
"description": "<string>",
"details": "<unknown>"
}
],
"dynamicTheme": {
"hostAvatarUrl": "<string>",
"guestAvatarUrl": "<string>"
},
"progress": 123
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Start chat
API endpoint to initiate a new chat session with a published agent.
curl --request POST \
--url https://release0.com/api/v1/agents/{publicId}/start \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"type": "text",
"text": "<string>",
"attachedFileUrls": [
"<string>"
]
},
"isStreamEnabled": false,
"resultId": "<string>",
"isOnlyRegistering": false,
"initialContext": {
"First name": "John",
"Email": "john@gmail.com"
},
"textBubbleContentFormat": "richText",
"request": "<unknown>"
}
'import requests
url = "https://release0.com/api/v1/agents/{publicId}/start"
payload = {
"message": {
"type": "text",
"text": "<string>",
"attachedFileUrls": ["<string>"]
},
"isStreamEnabled": False,
"resultId": "<string>",
"isOnlyRegistering": False,
"initialContext": {
"First name": "John",
"Email": "john@gmail.com"
},
"textBubbleContentFormat": "richText",
"request": "<unknown>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
message: {type: 'text', text: '<string>', attachedFileUrls: ['<string>']},
isStreamEnabled: false,
resultId: '<string>',
isOnlyRegistering: false,
initialContext: {'First name': 'John', Email: 'john@gmail.com'},
textBubbleContentFormat: 'richText',
request: '<unknown>'
})
};
fetch('https://release0.com/api/v1/agents/{publicId}/start', 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://release0.com/api/v1/agents/{publicId}/start",
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([
'message' => [
'type' => 'text',
'text' => '<string>',
'attachedFileUrls' => [
'<string>'
]
],
'isStreamEnabled' => false,
'resultId' => '<string>',
'isOnlyRegistering' => false,
'initialContext' => [
'First name' => 'John',
'Email' => 'john@gmail.com'
],
'textBubbleContentFormat' => 'richText',
'request' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"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://release0.com/api/v1/agents/{publicId}/start"
payload := strings.NewReader("{\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ]\n },\n \"isStreamEnabled\": false,\n \"resultId\": \"<string>\",\n \"isOnlyRegistering\": false,\n \"initialContext\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"textBubbleContentFormat\": \"richText\",\n \"request\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://release0.com/api/v1/agents/{publicId}/start")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ]\n },\n \"isStreamEnabled\": false,\n \"resultId\": \"<string>\",\n \"isOnlyRegistering\": false,\n \"initialContext\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"textBubbleContentFormat\": \"richText\",\n \"request\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://release0.com/api/v1/agents/{publicId}/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ]\n },\n \"isStreamEnabled\": false,\n \"resultId\": \"<string>\",\n \"isOnlyRegistering\": false,\n \"initialContext\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"textBubbleContentFormat\": \"richText\",\n \"request\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"sessionId": "<string>",
"agent": {
"id": "<string>",
"theme": {
"general": {
"font": "<string>",
"background": {
"type": "Color",
"content": "<string>"
},
"progressBar": {
"isEnabled": true,
"color": "<string>",
"backgroundColor": "<string>",
"placement": "Top",
"thickness": 123,
"position": "fixed"
}
},
"chat": {
"container": {
"maxWidth": "<string>",
"maxHeight": "<string>",
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"hostAvatar": {
"isEnabled": true,
"url": "<string>"
},
"guestAvatar": {
"isEnabled": true,
"url": "<string>"
},
"hostBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"guestBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"buttons": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"inputs": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
},
"placeholderColor": "<string>"
},
"roundness": "none",
"buttonsInput": {
"layout": "wrap"
}
},
"customCss": "<string>"
},
"settings": {
"general": {
"isBrandingEnabled": true,
"brandingText": "<string>",
"brandingUrl": "<string>",
"isTypingEmulationEnabled": true,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true,
"rememberUser": {
"isEnabled": true,
"storage": "session"
},
"expiration": {
"expiresAt": "<string>",
"expiredUrl": "<string>",
"expiredTitle": "<string>",
"expiredMessage": "<string>"
}
},
"typingEmulation": {
"enabled": true,
"speed": 123,
"maxDelay": 123,
"delayBetweenBubbles": 2.5,
"isDisabledOnFirstMessage": true
},
"metadata": {
"title": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"favIconUrl": "<string>",
"customHeadCode": "<string>",
"googleTagManagerId": "<string>"
},
"whatsApp": {
"isEnabled": true,
"startCondition": {
"logicalOperator": "OR",
"comparisons": [
{
"id": "<string>",
"comparisonOperator": "Equal to",
"value": "<string>"
}
]
},
"sessionExpiryTimeout": 24.005
},
"publicShare": {
"isEnabled": true
},
"security": {
"allowedOrigins": [
"<string>"
],
"password": "<string>"
}
},
"publishedAt": "<string>"
},
"messages": [
{
"id": "<string>",
"type": "text",
"content": {
"type": "richText",
"richText": "<unknown>"
}
}
],
"resultId": "<string>",
"lastMessageNewFormat": "<string>",
"input": {
"id": "<string>",
"type": "text input",
"outgoingEdgeId": "<string>",
"options": {
"labels": {
"placeholder": "<string>",
"button": "<string>"
},
"variableId": "<string>",
"isLong": true,
"isPassword": true,
"isRequired": true,
"audioClip": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
},
"attachments": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
}
},
"prefilledValue": "<string>",
"runtimeOptions": {
"paymentIntentSecret": "<string>",
"amountLabel": "<string>",
"publicKey": "<string>"
}
},
"clientSideActions": [
{
"type": "scriptToExecute",
"scriptToExecute": {
"content": "<string>",
"args": [
{
"id": "<string>",
"value": "<string>"
}
],
"isCode": true
},
"lastBubbleBlockId": "<string>",
"expectsDedicatedReply": true
}
],
"logs": [
{
"status": "<string>",
"description": "<string>",
"details": "<unknown>"
}
],
"dynamicTheme": {
"hostAvatarUrl": "<string>",
"guestAvatarUrl": "<string>"
},
"progress": 123
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Path Parameters
Public identifier of the bot.
Body
Only provide this if the flow starts with an input block and you want to directly submit an initial response.
- Text
- Audio
Show child attributes
Show child attributes
If enabled, OpenAI completions must be streamed from the client and the generated response sent back to the API.
Provide this if you want to overwrite an existing result.
If set to true, the session will only be registered and the bot will not be started. Useful for third-party chat platforms that require a session to exist before sending the first message.
Initial context used to prefill variables when starting the session.
Show child attributes
Show child attributes
{
"First name": "John",
"Email": "john@gmail.com"
}
richText, markdown Original HTTP request object.
Response
Successful response
Session identifier, used for subsequent continuation requests.
Show child attributes
Show child attributes
- Text
- Image
- Video
- Audio
- Embed
- Custom embed
Show child attributes
Show child attributes
Message validated and normalized by the backend. For example, responses like tomorrow in a date input are converted into an explicit date value.
- Text
- Buttons
- Email
- Address
- Password
- Autocomplete
- Number
- URL
- Phone number
- Date
- Payment
- Rating
- File
- Picture choice
- Buttons v5
- File input v5
- Picture choice v5
Show child attributes
Show child attributes
Actions to be executed on the client side.
- Script to execute
- Redirect
- Chatwoot
- Google Analytics
- Wait
- Set variable
- Stream OpenAI
- Execute HTTP request
- Inject start props
- Init Pixel
- Exec stream
- Execute code
- Listen to webhook
Show child attributes
Show child attributes
Logs generated during the last execution.
Show child attributes
Show child attributes
If the agent includes dynamic avatars, returns updated avatar URLs whenever their variables change.
Show child attributes
Show child attributes
If the progress bar is enabled, returns a value between 0 and 100 indicating the current progress based on the longest remaining path in the flow.