Skip to main content
POST
/
v1
/
sessions
/
{sessionId}
/
continueChat
Continue chat
curl --request POST \
  --url https://typebot.io/api/v1/sessions/{sessionId}/continueChat \
  --header 'Content-Type: application/json' \
  --data '{
  "message": "<string>"
}'
{
  "lastMessageNewFormat": "<string>",
  "messages": [
    {
      "id": "<string>",
      "type": "text",
      "content": {
        "html": "<string>",
        "richText": [
          "<any>"
        ],
        "plainText": "<string>"
      }
    }
  ],
  "input": {
    "id": "<string>",
    "outgoingEdgeId": "<string>",
    "type": "text input",
    "options": {
      "labels": {
        "placeholder": "<string>",
        "button": "<string>"
      },
      "variableId": "<string>",
      "isLong": true
    },
    "prefilledValue": "<string>",
    "runtimeOptions": {
      "paymentIntentSecret": "<string>",
      "amountLabel": "<string>",
      "publicKey": "<string>"
    }
  },
  "clientSideActions": [
    {
      "type": "scriptToExecute",
      "scriptToExecute": {
        "content": "<string>",
        "args": [
          {
            "id": "<string>",
            "value": "<string>"
          }
        ]
      },
      "lastBubbleBlockId": "<string>",
      "expectsDedicatedReply": true
    }
  ],
  "logs": [
    {
      "status": "<string>",
      "description": "<string>",
      "details": "<any>"
    }
  ],
  "dynamicTheme": {
    "hostAvatarUrl": "<string>",
    "guestAvatarUrl": "<string>"
  }
}

Path Parameters

sessionId
string
required

The session ID you got from the startChat response.

Body

application/json
message
string

Response

Successful response

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

The sent message is validated and formatted on the backend. For example, if for a date input you replied something like tomorrow, the backend will convert it to a date string. This field returns the formatted message.

input
object
  • Text
  • Buttons
  • Email
  • Number
  • URL
  • Phone number
  • Date
  • Payment
  • Rating
  • File
  • Picture choice
  • Buttons v5
  • File input v5
  • Picture choice v5
clientSideActions
(Script to execute · object | Redirect · object | Chatwoot · object | Google Analytics · object | Wait · object | Set variable · object | Stream OpenAI · object | Execute webhook · object | Inject start props · object | Init Pixel · object | Exec stream · object | Execute code · object)[]

Actions to execute on the client side

  • Script to execute
  • Redirect
  • Chatwoot
  • Google Analytics
  • Wait
  • Set variable
  • Stream OpenAI
  • Execute webhook
  • Inject start props
  • Init Pixel
  • Exec stream
  • Execute code
logs
object[]

Logs that were saved during the last execution

dynamicTheme
object

If the typebot contains dynamic avatars, dynamicTheme returns the new avatar URLs whenever their variables are updated.