Skip to main content
POST
/
v1
/
agents
/
{publicId}
/
start
Start agent chat
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>"
}
'
{
  "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
}

Path Parameters

publicId
string
required

Public identifier of the bot.

Body

application/json
message
Text · object

Only provide this if the flow starts with an input block and you want to directly submit an initial response.

isStreamEnabled
boolean
default:false

If enabled, OpenAI completions must be streamed from the client and the generated response sent back to the API.

resultId
string

Provide this if you want to overwrite an existing result.

isOnlyRegistering
boolean
default:false

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.

initialContext
object

Initial context used to prefill variables when starting the session.

Example:
{
"First name": "John",
"Email": "john@gmail.com"
}
textBubbleContentFormat
enum<string>
default:richText
Available options:
richText,
markdown
request
any

Original HTTP request object.

Response

Successful response

sessionId
string
required

Session identifier, used for subsequent continuation requests.

agent
object
required
messages
(Text · object | Image · object | Video · object | Audio · object | Embed · object | Custom embed · object)[]
required
resultId
string
lastMessageNewFormat
string

Message validated and normalized by the backend. For example, responses like tomorrow in a date input are converted into an explicit date value.

input
Text · object
clientSideActions
(Script to execute · object | Redirect · object | Chatwoot · object | Google Analytics · object | Wait · object | Set variable · object | Stream OpenAI · object | Execute HTTP request · object | Inject start props · object | Init Pixel · object | Exec stream · object | Execute code · object | Listen to webhook · object)[]

Actions to be executed on the client side.

logs
object[]

Logs generated during the last execution.

dynamicTheme
object

If the agent includes dynamic avatars, returns updated avatar URLs whenever their variables change.

progress
number

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.