Create a voice profile
curl --request POST \
--url https://app.pepline.ai/api/v1/voice_profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"languages": [
"<string>"
],
"formality": "<string>",
"tone_rules": [
"<string>"
],
"banned_phrases": [
"<string>"
],
"preferred_phrases": [
"<string>"
],
"sign_off_style": "<string>",
"agents": [
"<string>"
]
}
'import requests
url = "https://app.pepline.ai/api/v1/voice_profiles"
payload = {
"name": "<string>",
"languages": ["<string>"],
"formality": "<string>",
"tone_rules": ["<string>"],
"banned_phrases": ["<string>"],
"preferred_phrases": ["<string>"],
"sign_off_style": "<string>",
"agents": ["<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({
name: '<string>',
languages: ['<string>'],
formality: '<string>',
tone_rules: ['<string>'],
banned_phrases: ['<string>'],
preferred_phrases: ['<string>'],
sign_off_style: '<string>',
agents: ['<string>']
})
};
fetch('https://app.pepline.ai/api/v1/voice_profiles', 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://app.pepline.ai/api/v1/voice_profiles",
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([
'name' => '<string>',
'languages' => [
'<string>'
],
'formality' => '<string>',
'tone_rules' => [
'<string>'
],
'banned_phrases' => [
'<string>'
],
'preferred_phrases' => [
'<string>'
],
'sign_off_style' => '<string>',
'agents' => [
'<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://app.pepline.ai/api/v1/voice_profiles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"formality\": \"<string>\",\n \"tone_rules\": [\n \"<string>\"\n ],\n \"banned_phrases\": [\n \"<string>\"\n ],\n \"preferred_phrases\": [\n \"<string>\"\n ],\n \"sign_off_style\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\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://app.pepline.ai/api/v1/voice_profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"formality\": \"<string>\",\n \"tone_rules\": [\n \"<string>\"\n ],\n \"banned_phrases\": [\n \"<string>\"\n ],\n \"preferred_phrases\": [\n \"<string>\"\n ],\n \"sign_off_style\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/voice_profiles")
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 \"name\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"formality\": \"<string>\",\n \"tone_rules\": [\n \"<string>\"\n ],\n \"banned_phrases\": [\n \"<string>\"\n ],\n \"preferred_phrases\": [\n \"<string>\"\n ],\n \"sign_off_style\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "<string>",
"id": 123,
"name": "<string>",
"languages": [
"<string>"
],
"agents": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"formality": "<string>",
"tone_rules": [
"<string>"
],
"banned_phrases": [
"<string>"
],
"preferred_phrases": [
"<string>"
],
"sign_off_style": "<string>",
"archived": true
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}Voice profiles
Create a voice profile
Voice is SELECTION, not activation: agents points each listed agent at THIS profile (an agent leaves a voice by being claimed by another, never by omission).
POST
/
voice_profiles
Create a voice profile
curl --request POST \
--url https://app.pepline.ai/api/v1/voice_profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"languages": [
"<string>"
],
"formality": "<string>",
"tone_rules": [
"<string>"
],
"banned_phrases": [
"<string>"
],
"preferred_phrases": [
"<string>"
],
"sign_off_style": "<string>",
"agents": [
"<string>"
]
}
'import requests
url = "https://app.pepline.ai/api/v1/voice_profiles"
payload = {
"name": "<string>",
"languages": ["<string>"],
"formality": "<string>",
"tone_rules": ["<string>"],
"banned_phrases": ["<string>"],
"preferred_phrases": ["<string>"],
"sign_off_style": "<string>",
"agents": ["<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({
name: '<string>',
languages: ['<string>'],
formality: '<string>',
tone_rules: ['<string>'],
banned_phrases: ['<string>'],
preferred_phrases: ['<string>'],
sign_off_style: '<string>',
agents: ['<string>']
})
};
fetch('https://app.pepline.ai/api/v1/voice_profiles', 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://app.pepline.ai/api/v1/voice_profiles",
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([
'name' => '<string>',
'languages' => [
'<string>'
],
'formality' => '<string>',
'tone_rules' => [
'<string>'
],
'banned_phrases' => [
'<string>'
],
'preferred_phrases' => [
'<string>'
],
'sign_off_style' => '<string>',
'agents' => [
'<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://app.pepline.ai/api/v1/voice_profiles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"formality\": \"<string>\",\n \"tone_rules\": [\n \"<string>\"\n ],\n \"banned_phrases\": [\n \"<string>\"\n ],\n \"preferred_phrases\": [\n \"<string>\"\n ],\n \"sign_off_style\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\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://app.pepline.ai/api/v1/voice_profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"formality\": \"<string>\",\n \"tone_rules\": [\n \"<string>\"\n ],\n \"banned_phrases\": [\n \"<string>\"\n ],\n \"preferred_phrases\": [\n \"<string>\"\n ],\n \"sign_off_style\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/voice_profiles")
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 \"name\": \"<string>\",\n \"languages\": [\n \"<string>\"\n ],\n \"formality\": \"<string>\",\n \"tone_rules\": [\n \"<string>\"\n ],\n \"banned_phrases\": [\n \"<string>\"\n ],\n \"preferred_phrases\": [\n \"<string>\"\n ],\n \"sign_off_style\": \"<string>\",\n \"agents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "<string>",
"id": 123,
"name": "<string>",
"languages": [
"<string>"
],
"agents": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"formality": "<string>",
"tone_rules": [
"<string>"
],
"banned_phrases": [
"<string>"
],
"preferred_phrases": [
"<string>"
],
"sign_off_style": "<string>",
"archived": true
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Body
application/json
Response
The created profile.
Allowed value:
"voice_profile"⌘I

