Brand Voice
Create brand voice
Create a new brand voice by providing source materials (URLs and/or documents). The AI will analyze the content and generate a brand voice profile. Processing happens asynchronously - poll the GET endpoint to check status.
POST
/
brand-voices
cURL
curl -X POST https://app.mavera.io/api/v1/brand-voices \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"label": "Acme Brand Voice",
"urls": ["https://acme.com/about", "https://acme.com/blog"],
"usage_context": "Marketing content and social media"
}'import requests
import time
headers = {"Authorization": "Bearer mvra_live_your_key_here"}
# Create brand voice
response = requests.post(
"https://app.mavera.io/api/v1/brand-voices",
headers=headers,
json={
"label": "Acme Brand Voice",
"urls": ["https://acme.com/about", "https://acme.com/blog"],
"usage_context": "Marketing content and social media"
}
)
brand_voice = response.json()
print(f"Created: {brand_voice['id']} (Status: {brand_voice['status']})")
# Poll for completion
while brand_voice["status"] in ["pending", "generating"]:
time.sleep(5)
brand_voice = requests.get(
f"https://app.mavera.io/api/v1/brand-voices/{brand_voice['id']}",
headers=headers
).json()
print(f"Status: {brand_voice['status']}")
print(f"Tone: {brand_voice['tone']}")const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
usage_context: '<string>',
workspace_id: '<string>',
urls: [
{
url: '<string>',
name: '<string>',
description: '<string>',
extracted_content: '<string>'
}
],
documents: [
{
name: '<string>',
url: '<string>',
file_type: '<string>',
file_size: 123,
description: '<string>',
extracted_content: '<string>'
}
],
user_examples: [{use_case: '<string>', example: '<string>'}],
user_vocabulary: {preferred_terms: ['<string>'], avoid_terms: ['<string>']},
user_tone: {adjectives: ['<string>'], dos: ['<string>'], donts: ['<string>']}
})
};
fetch('https://app.mavera.io/api/v1/brand-voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/brand-voices"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"usage_context\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"urls\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extracted_content\": \"<string>\"\n }\n ],\n \"documents\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"file_type\": \"<string>\",\n \"file_size\": 123,\n \"description\": \"<string>\",\n \"extracted_content\": \"<string>\"\n }\n ],\n \"user_examples\": [\n {\n \"use_case\": \"<string>\",\n \"example\": \"<string>\"\n }\n ],\n \"user_vocabulary\": {\n \"preferred_terms\": [\n \"<string>\"\n ],\n \"avoid_terms\": [\n \"<string>\"\n ]\n },\n \"user_tone\": {\n \"adjectives\": [\n \"<string>\"\n ],\n \"dos\": [\n \"<string>\"\n ],\n \"donts\": [\n \"<string>\"\n ]\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))
}{
"id": "<string>",
"object": "brand_voice",
"label": "<string>",
"usage_context": "<string>",
"status": "pending",
"error": "<string>",
"voice_summary": "<string>",
"tone": {
"adjectives": [
"<string>"
],
"dos": [
"<string>"
],
"donts": [
"<string>"
]
},
"writing_style": {
"sentence_structure": "<string>",
"jargon_usage": "<string>"
},
"vocabulary": {
"preferred_terms": [
"<string>"
],
"avoid_terms": [
"<string>"
]
},
"example_phrases": [
{
"use_case": "<string>",
"example": "<string>"
}
],
"sources": {
"urls": [
{
"id": "<string>",
"url": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"documents": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"file_type": "<string>",
"file_size": 123
}
]
},
"workspace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}Authorizations
Body
application/json
Response
Brand voice created successfully. Status will be 'pending' until processing completes.
A brand voice profile for content generation
⌘I
cURL
curl -X POST https://app.mavera.io/api/v1/brand-voices \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"label": "Acme Brand Voice",
"urls": ["https://acme.com/about", "https://acme.com/blog"],
"usage_context": "Marketing content and social media"
}'import requests
import time
headers = {"Authorization": "Bearer mvra_live_your_key_here"}
# Create brand voice
response = requests.post(
"https://app.mavera.io/api/v1/brand-voices",
headers=headers,
json={
"label": "Acme Brand Voice",
"urls": ["https://acme.com/about", "https://acme.com/blog"],
"usage_context": "Marketing content and social media"
}
)
brand_voice = response.json()
print(f"Created: {brand_voice['id']} (Status: {brand_voice['status']})")
# Poll for completion
while brand_voice["status"] in ["pending", "generating"]:
time.sleep(5)
brand_voice = requests.get(
f"https://app.mavera.io/api/v1/brand-voices/{brand_voice['id']}",
headers=headers
).json()
print(f"Status: {brand_voice['status']}")
print(f"Tone: {brand_voice['tone']}")const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
usage_context: '<string>',
workspace_id: '<string>',
urls: [
{
url: '<string>',
name: '<string>',
description: '<string>',
extracted_content: '<string>'
}
],
documents: [
{
name: '<string>',
url: '<string>',
file_type: '<string>',
file_size: 123,
description: '<string>',
extracted_content: '<string>'
}
],
user_examples: [{use_case: '<string>', example: '<string>'}],
user_vocabulary: {preferred_terms: ['<string>'], avoid_terms: ['<string>']},
user_tone: {adjectives: ['<string>'], dos: ['<string>'], donts: ['<string>']}
})
};
fetch('https://app.mavera.io/api/v1/brand-voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/brand-voices"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"usage_context\": \"<string>\",\n \"workspace_id\": \"<string>\",\n \"urls\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extracted_content\": \"<string>\"\n }\n ],\n \"documents\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"file_type\": \"<string>\",\n \"file_size\": 123,\n \"description\": \"<string>\",\n \"extracted_content\": \"<string>\"\n }\n ],\n \"user_examples\": [\n {\n \"use_case\": \"<string>\",\n \"example\": \"<string>\"\n }\n ],\n \"user_vocabulary\": {\n \"preferred_terms\": [\n \"<string>\"\n ],\n \"avoid_terms\": [\n \"<string>\"\n ]\n },\n \"user_tone\": {\n \"adjectives\": [\n \"<string>\"\n ],\n \"dos\": [\n \"<string>\"\n ],\n \"donts\": [\n \"<string>\"\n ]\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))
}{
"id": "<string>",
"object": "brand_voice",
"label": "<string>",
"usage_context": "<string>",
"status": "pending",
"error": "<string>",
"voice_summary": "<string>",
"tone": {
"adjectives": [
"<string>"
],
"dos": [
"<string>"
],
"donts": [
"<string>"
]
},
"writing_style": {
"sentence_structure": "<string>",
"jargon_usage": "<string>"
},
"vocabulary": {
"preferred_terms": [
"<string>"
],
"avoid_terms": [
"<string>"
]
},
"example_phrases": [
{
"use_case": "<string>",
"example": "<string>"
}
],
"sources": {
"urls": [
{
"id": "<string>",
"url": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"documents": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"file_type": "<string>",
"file_size": 123
}
]
},
"workspace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}