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
POSTHeaders
| Headers | Value | Description |
|---|---|---|
| Content-Type | application/json | Indicates that the request body is JSON. |
| Authorization | Bearer <api_key> | Use the API key provided in Install in the Sidetalk dashboard. |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| sessionId | String | Yes | A unique conversation session key. Keep it consistent to connect form submissions to the same user flow. |
| chat_log_uuid | String | No | The conversation log UUID linked to this form. |
| message | String | No | The message used to generate a follow-up answer after submission. If absent, a default message may be used. |
| stream | Boolean | No | Whether to receive a streamed response: true or false. Defaults to false if omitted. |
| inputForm | Object | Yes | The form submission data object. |
inputForm object
| Parameter | Type | Required | Description |
|---|---|---|---|
| form_id | String or Number | Yes | The form ID to submit. |
| task_id | String | No | The task ID linked to the form. |
| order | Number | No | The action’s order within the task. |
| original_chat_log_uuid | String | No | The conversation log UUID where the form first appeared. |
| executionHistory | Array | No | Previous agent execution history. |
| form_data | Object | Yes | Field 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.
