cURL
curl --request POST \
--url https://alto.dialme.at/api/altov2/public/assistants/create-telephony \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>",
"name": "<string>",
"phone_number": "<string>",
"structured_data": [
{
"value": "<string>",
"choices": [
"<string>"
]
}
],
"webhook": "<string>"
}
'import requests
url = "https://alto.dialme.at/api/altov2/public/assistants/create-telephony"
payload = {
"template_id": "<string>",
"name": "<string>",
"phone_number": "<string>",
"structured_data": [
{
"value": "<string>",
"choices": ["<string>"]
}
],
"webhook": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_id: '<string>',
name: '<string>',
phone_number: '<string>',
structured_data: [{value: '<string>', choices: ['<string>']}],
webhook: '<string>'
})
};
fetch('https://alto.dialme.at/api/altov2/public/assistants/create-telephony', 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://alto.dialme.at/api/altov2/public/assistants/create-telephony",
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([
'template_id' => '<string>',
'name' => '<string>',
'phone_number' => '<string>',
'structured_data' => [
[
'value' => '<string>',
'choices' => [
'<string>'
]
]
],
'webhook' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://alto.dialme.at/api/altov2/public/assistants/create-telephony"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"structured_data\": [\n {\n \"value\": \"<string>\",\n \"choices\": [\n \"<string>\"\n ]\n }\n ],\n \"webhook\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://alto.dialme.at/api/altov2/public/assistants/create-telephony")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"structured_data\": [\n {\n \"value\": \"<string>\",\n \"choices\": [\n \"<string>\"\n ]\n }\n ],\n \"webhook\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alto.dialme.at/api/altov2/public/assistants/create-telephony")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"structured_data\": [\n {\n \"value\": \"<string>\",\n \"choices\": [\n \"<string>\"\n ]\n }\n ],\n \"webhook\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "success",
"result": {
"_id": "as_***",
"template_id": "tp_***",
"title": "<string>",
"conversational_states": {},
"language": "<string>",
"voice": "<string>",
"phone_number": "<string>",
"webhook": "<string>",
"structured_data": [
"<unknown>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "Bad Request"
}{
"message": "Unauthorized"
}{
"message": "Not Found"
}{
"message": "Method Not Allowed"
}Assistant Collection
Create a Telephony Assistant
POST
/
assistants
/
create-telephony
cURL
curl --request POST \
--url https://alto.dialme.at/api/altov2/public/assistants/create-telephony \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>",
"name": "<string>",
"phone_number": "<string>",
"structured_data": [
{
"value": "<string>",
"choices": [
"<string>"
]
}
],
"webhook": "<string>"
}
'import requests
url = "https://alto.dialme.at/api/altov2/public/assistants/create-telephony"
payload = {
"template_id": "<string>",
"name": "<string>",
"phone_number": "<string>",
"structured_data": [
{
"value": "<string>",
"choices": ["<string>"]
}
],
"webhook": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_id: '<string>',
name: '<string>',
phone_number: '<string>',
structured_data: [{value: '<string>', choices: ['<string>']}],
webhook: '<string>'
})
};
fetch('https://alto.dialme.at/api/altov2/public/assistants/create-telephony', 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://alto.dialme.at/api/altov2/public/assistants/create-telephony",
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([
'template_id' => '<string>',
'name' => '<string>',
'phone_number' => '<string>',
'structured_data' => [
[
'value' => '<string>',
'choices' => [
'<string>'
]
]
],
'webhook' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://alto.dialme.at/api/altov2/public/assistants/create-telephony"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"structured_data\": [\n {\n \"value\": \"<string>\",\n \"choices\": [\n \"<string>\"\n ]\n }\n ],\n \"webhook\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://alto.dialme.at/api/altov2/public/assistants/create-telephony")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"structured_data\": [\n {\n \"value\": \"<string>\",\n \"choices\": [\n \"<string>\"\n ]\n }\n ],\n \"webhook\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alto.dialme.at/api/altov2/public/assistants/create-telephony")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"structured_data\": [\n {\n \"value\": \"<string>\",\n \"choices\": [\n \"<string>\"\n ]\n }\n ],\n \"webhook\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "success",
"result": {
"_id": "as_***",
"template_id": "tp_***",
"title": "<string>",
"conversational_states": {},
"language": "<string>",
"voice": "<string>",
"phone_number": "<string>",
"webhook": "<string>",
"structured_data": [
"<unknown>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "Bad Request"
}{
"message": "Unauthorized"
}{
"message": "Not Found"
}{
"message": "Method Not Allowed"
}Body
application/json
Required string length:
24Required string length:
3 - 180Available options:
en-US-Neural2-D, en-US-Neural2-C, en-US-Neural2-J, en-US-News-K, en-GB-News-M, en-GB-Neural2-C, en-GB-Neural2-B, en-GB-Neural2-F, es-ES-Neural2-B, es-ES-Neural2-F, es-ES-Neural2-C, es-ES-Neural2-D, en-US-Eleven-Marcus, en-US-Eleven-Myra, en-US-Eleven-Adam, en-US-OpenAI-alloy, en-US-OpenAI-echo, en-GB-OpenAI-fable, en-US-OpenAI-onyx, en-US-OpenAI-nova, en-US-OpenAI-shimmer, es-ES-OpenAI-alloy, es-ES-OpenAI-echo, es-ES-OpenAI-onyx, es-ES-OpenAI-nova, es-ES-OpenAI-shimmer Required string length:
10 - 15Show child attributes
Show child attributes
We will trigger post request to this webhook url with this datan
{ "data": { "conversation_type": "telephony", "conversation_id": "", "assistant_id": "", "full_transcript": [], "edited_transcript": [], "data_points": [], "from_phone": "", "to_phone": "", "timestamp": 0, "call_duration": "" }, "signature": "" }
We generated a signature to secure the webhook payload, please refer to the colab example.
Minimum string length:
5⌘I