curl --request PUT \
--url https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/ \
--header 'Content-Type: multipart/form-data' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--form file=@example-file \
--form 'name=<string>'import requests
url = "https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "name": "<string>" }
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.put(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
const options = {method: 'PUT', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/', 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://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$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://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"audio_id": "<string>",
"action": "<string>",
"condition_id": "<string>",
"condition_ids": [
123
],
"steps": "<string>",
"tag": "<string>",
"status": "<string>",
"transcript": "<string>",
"duration": 123,
"filename": "<string>",
"timing_source": "<string>",
"error": "<string>",
"updated_at": "<string>",
"playback_url": "<string>"
}{
"field_name": [
"<string>"
]
}{
"detail": "<string>"
}{
"field_name": [
"<string>"
]
}Update Scenario Condition Audio
Replace this clip’s audio. Every action referencing it plays the new recording. Pass name to rename the clip at the same time — its <audio> tags are repointed for you, and the response carries previous_audio_id and the rewritten actions. The clip is transcoded and re-transcribed, so runs are blocked again until that finishes.
curl --request PUT \
--url https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/ \
--header 'Content-Type: multipart/form-data' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--form file=@example-file \
--form 'name=<string>'import requests
url = "https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "name": "<string>" }
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.put(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
const options = {method: 'PUT', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/', 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://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$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://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"audio_id": "<string>",
"action": "<string>",
"condition_id": "<string>",
"condition_ids": [
123
],
"steps": "<string>",
"tag": "<string>",
"status": "<string>",
"transcript": "<string>",
"duration": 123,
"filename": "<string>",
"timing_source": "<string>",
"error": "<string>",
"updated_at": "<string>",
"playback_url": "<string>"
}{
"field_name": [
"<string>"
]
}{
"detail": "<string>"
}{
"field_name": [
"<string>"
]
}Authorizations
API Key Authentication. It should be included in the header of each request.
Path Parameters
A unique integer value identifying this scenario.
Response
Read serializer for one Scenario.condition_audio entry (a plain dict).
The caller passes each entry dict with audio_id injected; fields are
tolerant of missing keys. words is intentionally not exposed (runtime-only
playback timing data), and neither is previous_action (internal undo state
for a clip that replaced a whole action).
First condition referencing this clip, or null when no action references it. Kept for compatibility - prefer condition_ids.
Every condition referencing this clip, in authored order. Empty when the clip is uploaded but not referenced by any action yet.
Every step referencing this clip, as paths into the conditional actions (e.g. first_message, conditions[1].then[0]).
The reference to paste into an action, e.g.
S3 URL of the recorded audio clip