SidetalkGuides
Sidetalk website ↗Open dashboard

Form Submission API

Purpose

This API submits form data included in the Conversational Answer Generation API response.
It saves submitted input values and automatically continues any subsequent agent tasks.
Its response may therefore include regular text, another form, cards, page navigation data, and more.

URL


HTTP method

Plain Text
POST

Headers

HeadersValueDescription
Content-Typeapplication/jsonIndicates that the request body is JSON.
AuthorizationBearer <api_key>Use the API key provided in Install in the Sidetalk dashboard.

Body

ParameterTypeRequiredDescription
sessionIdStringYesA unique conversation session key. Keep it consistent to connect form submissions to the same user flow.
chat_log_uuidStringNoThe conversation log UUID linked to this form.
messageStringNoThe message used to generate a follow-up answer after submission. If absent, a default message may be used.
streamBooleanNoWhether to receive a streamed response: true or false. Defaults to false if omitted.
inputFormObjectYesThe form submission data object.

inputForm object

ParameterTypeRequiredDescription
form_idString or NumberYesThe form ID to submit.
task_idStringNoThe task ID linked to the form.
orderNumberNoThe action’s order within the task.
original_chat_log_uuidStringNoThe conversation log UUID where the form first appeared.
executionHistoryArrayNoPrevious agent execution history.
form_dataObjectYesField values entered by the user. Each key must match field_id in the form definition.

form_data example

JSON
{
  "customer_name": "홍길동",
  "customer_phone": "01012345678",
  "customer_email": "test@example.com"
}

Example request

JSON
curl -X POST https://api.sidetalk.ai/v1/chat/input-forms/submit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${API_KEY}" \
  -d '{
    "sessionId": "test-session-id",
    "chat_log_uuid": "2b9cc8fb-3cc6-4d40-aef6-d44af3d074f3",
    "message": "입력폼 제출",
    "stream": false,
    "inputForm": {
      "form_id": 101,
      "task_id": "task_101",
      "order": 1,
      "original_chat_log_uuid": "2b9cc8fb-3cc6-4d40-aef6-d44af3d074f3",
      "executionHistory": [],
      "form_data": {
        "customer_name": "홍길동",
        "customer_phone": "01012345678"
      }
    }
  }'

Response format

The response format matches the Conversational Answer Generation API.
  • With stream: true, returns SSE (Server-Sent Events).
  • With stream: false, returns JSON.
Depending on follow-up task results, it may return regular text, another form, cards, page navigation data, and more.

How input values are saved

Input values are saved first when a form is submitted.
  • If a table is connected to the form, values are saved there.
  • If no table is connected, the submission may be saved in internal chat logs.
This API does more than save data: it also generates a follow-up answer after saving the input.