curl --request POST \
--url https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions \
--header 'Content-Type: application/json' \
--data '
{
"interaction_id": "ci_call_8f2d41_submit_5e0b7c2a",
"tool_call_id": "call_8f2d41",
"component": "canvas.question",
"component_version": "v1",
"type": "submit",
"value": {
"selected_option_ids": [
"opt_2"
],
"skipped": false
},
"metadata": {
"client": "kiosk-web"
}
}
'import requests
url = "https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions"
payload = {
"interaction_id": "ci_call_8f2d41_submit_5e0b7c2a",
"tool_call_id": "call_8f2d41",
"component": "canvas.question",
"component_version": "v1",
"type": "submit",
"value": {
"selected_option_ids": ["opt_2"],
"skipped": False
},
"metadata": { "client": "kiosk-web" }
}
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({
interaction_id: 'ci_call_8f2d41_submit_5e0b7c2a',
tool_call_id: 'call_8f2d41',
component: 'canvas.question',
component_version: 'v1',
type: 'submit',
value: {selected_option_ids: ['opt_2'], skipped: false},
metadata: {client: 'kiosk-web'}
})
};
fetch('https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions', 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://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions",
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([
'interaction_id' => 'ci_call_8f2d41_submit_5e0b7c2a',
'tool_call_id' => 'call_8f2d41',
'component' => 'canvas.question',
'component_version' => 'v1',
'type' => 'submit',
'value' => [
'selected_option_ids' => [
'opt_2'
],
'skipped' => false
],
'metadata' => [
'client' => 'kiosk-web'
]
]),
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://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions"
payload := strings.NewReader("{\n \"interaction_id\": \"ci_call_8f2d41_submit_5e0b7c2a\",\n \"tool_call_id\": \"call_8f2d41\",\n \"component\": \"canvas.question\",\n \"component_version\": \"v1\",\n \"type\": \"submit\",\n \"value\": {\n \"selected_option_ids\": [\n \"opt_2\"\n ],\n \"skipped\": false\n },\n \"metadata\": {\n \"client\": \"kiosk-web\"\n }\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://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions")
.header("Content-Type", "application/json")
.body("{\n \"interaction_id\": \"ci_call_8f2d41_submit_5e0b7c2a\",\n \"tool_call_id\": \"call_8f2d41\",\n \"component\": \"canvas.question\",\n \"component_version\": \"v1\",\n \"type\": \"submit\",\n \"value\": {\n \"selected_option_ids\": [\n \"opt_2\"\n ],\n \"skipped\": false\n },\n \"metadata\": {\n \"client\": \"kiosk-web\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions")
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 \"interaction_id\": \"ci_call_8f2d41_submit_5e0b7c2a\",\n \"tool_call_id\": \"call_8f2d41\",\n \"component\": \"canvas.question\",\n \"component_version\": \"v1\",\n \"type\": \"submit\",\n \"value\": {\n \"selected_option_ids\": [\n \"opt_2\"\n ],\n \"skipped\": false\n },\n \"metadata\": {\n \"client\": \"kiosk-web\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Invalid canvas interaction payload.",
"fields": [
"component",
"value"
]
}{
"message": "Interaction does not match the issued canvas instance for this tool_call_id."
}{
"error": "Too many requests"
}Record Canvas Interaction
Record a Magic Canvas interaction (submit, skip, dismiss, clear, error, or heartbeat) while a conversation is active.
The Tavus-hosted embed and @tavus/cvi-ui post interactions for you. Call this endpoint directly only if you build your own renderer.
Authentication: No API key is required while the conversation is active. Never put your Tavus API key in a browser. Once the conversation ends, every POST is rejected.
Idempotency: Retries with the same (conversation_id, interaction_id) and identical tool_call_id, component, component_version, type, and value return 200 without firing a second webhook. metadata is excluded from the match. Zero Data Retention (ZDR) conversations record no interactions, so they skip only the reused-id check. A repeat under the same interaction_id returns 200 and is delivered to the callback_url again, even when the payload differs. A payload that does not match the card Tavus issued is still a 409.
Rate limiting: 120 POSTs per 60-second window per (client IP, conversation_id). Exceeding the limit returns 429 with { "error": "Too many requests" } and a Retry-After header (seconds until the window resets). Custom renderers posting heartbeat interactions count toward this limit.
See Canvas interactions for per-component value rules, webhook delivery, ZDR behavior, and the full error catalog.
curl --request POST \
--url https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions \
--header 'Content-Type: application/json' \
--data '
{
"interaction_id": "ci_call_8f2d41_submit_5e0b7c2a",
"tool_call_id": "call_8f2d41",
"component": "canvas.question",
"component_version": "v1",
"type": "submit",
"value": {
"selected_option_ids": [
"opt_2"
],
"skipped": false
},
"metadata": {
"client": "kiosk-web"
}
}
'import requests
url = "https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions"
payload = {
"interaction_id": "ci_call_8f2d41_submit_5e0b7c2a",
"tool_call_id": "call_8f2d41",
"component": "canvas.question",
"component_version": "v1",
"type": "submit",
"value": {
"selected_option_ids": ["opt_2"],
"skipped": False
},
"metadata": { "client": "kiosk-web" }
}
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({
interaction_id: 'ci_call_8f2d41_submit_5e0b7c2a',
tool_call_id: 'call_8f2d41',
component: 'canvas.question',
component_version: 'v1',
type: 'submit',
value: {selected_option_ids: ['opt_2'], skipped: false},
metadata: {client: 'kiosk-web'}
})
};
fetch('https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions', 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://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions",
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([
'interaction_id' => 'ci_call_8f2d41_submit_5e0b7c2a',
'tool_call_id' => 'call_8f2d41',
'component' => 'canvas.question',
'component_version' => 'v1',
'type' => 'submit',
'value' => [
'selected_option_ids' => [
'opt_2'
],
'skipped' => false
],
'metadata' => [
'client' => 'kiosk-web'
]
]),
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://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions"
payload := strings.NewReader("{\n \"interaction_id\": \"ci_call_8f2d41_submit_5e0b7c2a\",\n \"tool_call_id\": \"call_8f2d41\",\n \"component\": \"canvas.question\",\n \"component_version\": \"v1\",\n \"type\": \"submit\",\n \"value\": {\n \"selected_option_ids\": [\n \"opt_2\"\n ],\n \"skipped\": false\n },\n \"metadata\": {\n \"client\": \"kiosk-web\"\n }\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://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions")
.header("Content-Type", "application/json")
.body("{\n \"interaction_id\": \"ci_call_8f2d41_submit_5e0b7c2a\",\n \"tool_call_id\": \"call_8f2d41\",\n \"component\": \"canvas.question\",\n \"component_version\": \"v1\",\n \"type\": \"submit\",\n \"value\": {\n \"selected_option_ids\": [\n \"opt_2\"\n ],\n \"skipped\": false\n },\n \"metadata\": {\n \"client\": \"kiosk-web\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/conversations/{conversation_id}/canvas/interactions")
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 \"interaction_id\": \"ci_call_8f2d41_submit_5e0b7c2a\",\n \"tool_call_id\": \"call_8f2d41\",\n \"component\": \"canvas.question\",\n \"component_version\": \"v1\",\n \"type\": \"submit\",\n \"value\": {\n \"selected_option_ids\": [\n \"opt_2\"\n ],\n \"skipped\": false\n },\n \"metadata\": {\n \"client\": \"kiosk-web\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Invalid canvas interaction payload.",
"fields": [
"component",
"value"
]
}{
"message": "Interaction does not match the issued canvas instance for this tool_call_id."
}{
"error": "Too many requests"
}https://docs.tavus.io/openapi.yaml for the full HTTP API contract.value rules, webhook delivery, and the full error catalog.Path Parameters
Body
Body for Record Canvas Interaction. value validation depends on component and type - see Canvas interactions.

