Voice
Create a voice profile
Human-only: creates a draft voice profile plus its consent record in one transaction.
POST
/
v1
/
voice-admin
/
profiles
Create a voice profile
curl --request POST \
--url https://api.usenaive.ai/v1/voice-admin/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"consent": {
"consenter_name": "<string>",
"attestation_text": "<string>",
"consent_type": "self",
"authorized_uses": [
"<string>"
],
"consenting_email": "<string>",
"tos_version": "<string>",
"tos_content_hash": "<string>"
},
"scope": "company",
"agent_id": "<string>"
}
'import requests
url = "https://api.usenaive.ai/v1/voice-admin/profiles"
payload = {
"display_name": "<string>",
"consent": {
"consenter_name": "<string>",
"attestation_text": "<string>",
"consent_type": "self",
"authorized_uses": ["<string>"],
"consenting_email": "<string>",
"tos_version": "<string>",
"tos_content_hash": "<string>"
},
"scope": "company",
"agent_id": "<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({
display_name: '<string>',
consent: {
consenter_name: '<string>',
attestation_text: '<string>',
consent_type: 'self',
authorized_uses: ['<string>'],
consenting_email: '<string>',
tos_version: '<string>',
tos_content_hash: '<string>'
},
scope: 'company',
agent_id: '<string>'
})
};
fetch('https://api.usenaive.ai/v1/voice-admin/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://api.usenaive.ai/v1/voice-admin/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([
'display_name' => '<string>',
'consent' => [
'consenter_name' => '<string>',
'attestation_text' => '<string>',
'consent_type' => 'self',
'authorized_uses' => [
'<string>'
],
'consenting_email' => '<string>',
'tos_version' => '<string>',
'tos_content_hash' => '<string>'
],
'scope' => 'company',
'agent_id' => '<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://api.usenaive.ai/v1/voice-admin/profiles"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"consent\": {\n \"consenter_name\": \"<string>\",\n \"attestation_text\": \"<string>\",\n \"consent_type\": \"self\",\n \"authorized_uses\": [\n \"<string>\"\n ],\n \"consenting_email\": \"<string>\",\n \"tos_version\": \"<string>\",\n \"tos_content_hash\": \"<string>\"\n },\n \"scope\": \"company\",\n \"agent_id\": \"<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://api.usenaive.ai/v1/voice-admin/profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"consent\": {\n \"consenter_name\": \"<string>\",\n \"attestation_text\": \"<string>\",\n \"consent_type\": \"self\",\n \"authorized_uses\": [\n \"<string>\"\n ],\n \"consenting_email\": \"<string>\",\n \"tos_version\": \"<string>\",\n \"tos_content_hash\": \"<string>\"\n },\n \"scope\": \"company\",\n \"agent_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenaive.ai/v1/voice-admin/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 \"display_name\": \"<string>\",\n \"consent\": {\n \"consenter_name\": \"<string>\",\n \"attestation_text\": \"<string>\",\n \"consent_type\": \"self\",\n \"authorized_uses\": [\n \"<string>\"\n ],\n \"consenting_email\": \"<string>\",\n \"tos_version\": \"<string>\",\n \"tos_content_hash\": \"<string>\"\n },\n \"scope\": \"company\",\n \"agent_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"profile_id": "<string>",
"consent_token": "<string>"
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}Authorizations
Workspace API key. Create one via the dashboard or POST /v1/auth/keys.
Body
application/json
⌘I
Create a voice profile
curl --request POST \
--url https://api.usenaive.ai/v1/voice-admin/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"consent": {
"consenter_name": "<string>",
"attestation_text": "<string>",
"consent_type": "self",
"authorized_uses": [
"<string>"
],
"consenting_email": "<string>",
"tos_version": "<string>",
"tos_content_hash": "<string>"
},
"scope": "company",
"agent_id": "<string>"
}
'import requests
url = "https://api.usenaive.ai/v1/voice-admin/profiles"
payload = {
"display_name": "<string>",
"consent": {
"consenter_name": "<string>",
"attestation_text": "<string>",
"consent_type": "self",
"authorized_uses": ["<string>"],
"consenting_email": "<string>",
"tos_version": "<string>",
"tos_content_hash": "<string>"
},
"scope": "company",
"agent_id": "<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({
display_name: '<string>',
consent: {
consenter_name: '<string>',
attestation_text: '<string>',
consent_type: 'self',
authorized_uses: ['<string>'],
consenting_email: '<string>',
tos_version: '<string>',
tos_content_hash: '<string>'
},
scope: 'company',
agent_id: '<string>'
})
};
fetch('https://api.usenaive.ai/v1/voice-admin/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://api.usenaive.ai/v1/voice-admin/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([
'display_name' => '<string>',
'consent' => [
'consenter_name' => '<string>',
'attestation_text' => '<string>',
'consent_type' => 'self',
'authorized_uses' => [
'<string>'
],
'consenting_email' => '<string>',
'tos_version' => '<string>',
'tos_content_hash' => '<string>'
],
'scope' => 'company',
'agent_id' => '<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://api.usenaive.ai/v1/voice-admin/profiles"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"consent\": {\n \"consenter_name\": \"<string>\",\n \"attestation_text\": \"<string>\",\n \"consent_type\": \"self\",\n \"authorized_uses\": [\n \"<string>\"\n ],\n \"consenting_email\": \"<string>\",\n \"tos_version\": \"<string>\",\n \"tos_content_hash\": \"<string>\"\n },\n \"scope\": \"company\",\n \"agent_id\": \"<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://api.usenaive.ai/v1/voice-admin/profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"consent\": {\n \"consenter_name\": \"<string>\",\n \"attestation_text\": \"<string>\",\n \"consent_type\": \"self\",\n \"authorized_uses\": [\n \"<string>\"\n ],\n \"consenting_email\": \"<string>\",\n \"tos_version\": \"<string>\",\n \"tos_content_hash\": \"<string>\"\n },\n \"scope\": \"company\",\n \"agent_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenaive.ai/v1/voice-admin/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 \"display_name\": \"<string>\",\n \"consent\": {\n \"consenter_name\": \"<string>\",\n \"attestation_text\": \"<string>\",\n \"consent_type\": \"self\",\n \"authorized_uses\": [\n \"<string>\"\n ],\n \"consenting_email\": \"<string>\",\n \"tos_version\": \"<string>\",\n \"tos_content_hash\": \"<string>\"\n },\n \"scope\": \"company\",\n \"agent_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"profile_id": "<string>",
"consent_token": "<string>"
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}{
"error": {
"message": "<string>",
"hint": "<string>",
"reason": "<string>"
}
}