Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.agents.postCardClickEvent({
testId: "<id>",
cardClickRequest: {
actionId: "<id>",
actionType: "action",
},
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.agents.post_card_click_event(test_id="<id>", card_click_request={
"action_id": "<id>",
"action_type": models.ActionType.ACTION,
})
# Handle response
print(res)curl --request POST \
--url https://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"action_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action_id: '<string>'})
};
fetch('https://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click', 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.syllable.cloud/api/v1/agents/test/{test_id}/card-click",
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([
'action_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-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.syllable.cloud/api/v1/agents/test/{test_id}/card-click"
payload := strings.NewReader("{\n \"action_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Syllable-API-Key", "<api-key>")
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://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"action_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}agents
Create Card Click Event
Log an EventLog for a client-side card click interaction.
POST
/
api
/
v1
/
agents
/
test
/
{test_id}
/
card-click
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.agents.postCardClickEvent({
testId: "<id>",
cardClickRequest: {
actionId: "<id>",
actionType: "action",
},
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.agents.post_card_click_event(test_id="<id>", card_click_request={
"action_id": "<id>",
"action_type": models.ActionType.ACTION,
})
# Handle response
print(res)curl --request POST \
--url https://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"action_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action_id: '<string>'})
};
fetch('https://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click', 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.syllable.cloud/api/v1/agents/test/{test_id}/card-click",
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([
'action_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-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.syllable.cloud/api/v1/agents/test/{test_id}/card-click"
payload := strings.NewReader("{\n \"action_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Syllable-API-Key", "<api-key>")
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://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"action_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/agents/test/{test_id}/card-click")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
Response
Successful Response
The outcome of the request

