Upsert branding
curl --request PUT \
--url https://app.demand-iq.com/api/decks/{deckId}/branding \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"palette": {
"primary": "#1a73e8",
"primaryLight": "#4a9af5",
"accent": "#fbbc04",
"neutral": "#5f6368",
"text": "#202124",
"userMessage": "#1a73e8",
"assistantMessage": "#f1f3f4"
},
"cta": {
"headline": "<string>",
"body": "<string>",
"buttonText": "<string>",
"buttonUrl": "<string>"
},
"name": "<string>",
"logo": "<string>",
"avatar": "<string>",
"chatName": "<string>",
"chatGreeting": "<string>",
"fonts": {},
"contact": {
"phone": "<string>",
"email": "jsmith@example.com"
}
}
'import requests
url = "https://app.demand-iq.com/api/decks/{deckId}/branding"
payload = {
"palette": {
"primary": "#1a73e8",
"primaryLight": "#4a9af5",
"accent": "#fbbc04",
"neutral": "#5f6368",
"text": "#202124",
"userMessage": "#1a73e8",
"assistantMessage": "#f1f3f4"
},
"cta": {
"headline": "<string>",
"body": "<string>",
"buttonText": "<string>",
"buttonUrl": "<string>"
},
"name": "<string>",
"logo": "<string>",
"avatar": "<string>",
"chatName": "<string>",
"chatGreeting": "<string>",
"fonts": {},
"contact": {
"phone": "<string>",
"email": "jsmith@example.com"
}
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
palette: {
primary: '#1a73e8',
primaryLight: '#4a9af5',
accent: '#fbbc04',
neutral: '#5f6368',
text: '#202124',
userMessage: '#1a73e8',
assistantMessage: '#f1f3f4'
},
cta: {
headline: '<string>',
body: JSON.stringify('<string>'),
buttonText: '<string>',
buttonUrl: '<string>'
},
name: '<string>',
logo: '<string>',
avatar: '<string>',
chatName: '<string>',
chatGreeting: '<string>',
fonts: {},
contact: {phone: '<string>', email: 'jsmith@example.com'}
})
};
fetch('https://app.demand-iq.com/api/decks/{deckId}/branding', 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.demand-iq.com/api/decks/{deckId}/branding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'palette' => [
'primary' => '#1a73e8',
'primaryLight' => '#4a9af5',
'accent' => '#fbbc04',
'neutral' => '#5f6368',
'text' => '#202124',
'userMessage' => '#1a73e8',
'assistantMessage' => '#f1f3f4'
],
'cta' => [
'headline' => '<string>',
'body' => '<string>',
'buttonText' => '<string>',
'buttonUrl' => '<string>'
],
'name' => '<string>',
'logo' => '<string>',
'avatar' => '<string>',
'chatName' => '<string>',
'chatGreeting' => '<string>',
'fonts' => [
],
'contact' => [
'phone' => '<string>',
'email' => 'jsmith@example.com'
]
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"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.demand-iq.com/api/decks/{deckId}/branding"
payload := strings.NewReader("{\n \"palette\": {\n \"primary\": \"#1a73e8\",\n \"primaryLight\": \"#4a9af5\",\n \"accent\": \"#fbbc04\",\n \"neutral\": \"#5f6368\",\n \"text\": \"#202124\",\n \"userMessage\": \"#1a73e8\",\n \"assistantMessage\": \"#f1f3f4\"\n },\n \"cta\": {\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"buttonUrl\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"avatar\": \"<string>\",\n \"chatName\": \"<string>\",\n \"chatGreeting\": \"<string>\",\n \"fonts\": {},\n \"contact\": {\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "session=")
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.put("https://app.demand-iq.com/api/decks/{deckId}/branding")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"palette\": {\n \"primary\": \"#1a73e8\",\n \"primaryLight\": \"#4a9af5\",\n \"accent\": \"#fbbc04\",\n \"neutral\": \"#5f6368\",\n \"text\": \"#202124\",\n \"userMessage\": \"#1a73e8\",\n \"assistantMessage\": \"#f1f3f4\"\n },\n \"cta\": {\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"buttonUrl\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"avatar\": \"<string>\",\n \"chatName\": \"<string>\",\n \"chatGreeting\": \"<string>\",\n \"fonts\": {},\n \"contact\": {\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/decks/{deckId}/branding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"palette\": {\n \"primary\": \"#1a73e8\",\n \"primaryLight\": \"#4a9af5\",\n \"accent\": \"#fbbc04\",\n \"neutral\": \"#5f6368\",\n \"text\": \"#202124\",\n \"userMessage\": \"#1a73e8\",\n \"assistantMessage\": \"#f1f3f4\"\n },\n \"cta\": {\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"buttonUrl\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"avatar\": \"<string>\",\n \"chatName\": \"<string>\",\n \"chatGreeting\": \"<string>\",\n \"fonts\": {},\n \"contact\": {\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"branding": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deckId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"palette": {
"primary": "#1a73e8",
"primaryLight": "#4a9af5",
"accent": "#fbbc04",
"neutral": "#5f6368",
"text": "#202124",
"userMessage": "#1a73e8",
"assistantMessage": "#f1f3f4"
},
"cta": {
"headline": "<string>",
"body": "<string>",
"buttonText": "<string>",
"buttonUrl": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"logo": "<string>",
"avatar": "<string>",
"chatName": "<string>",
"chatGreeting": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Branding
Upsert branding
Creates or replaces the branding configuration for a deck.
PUT
/
api
/
decks
/
{deckId}
/
branding
Upsert branding
curl --request PUT \
--url https://app.demand-iq.com/api/decks/{deckId}/branding \
--header 'Content-Type: application/json' \
--cookie session= \
--data '
{
"palette": {
"primary": "#1a73e8",
"primaryLight": "#4a9af5",
"accent": "#fbbc04",
"neutral": "#5f6368",
"text": "#202124",
"userMessage": "#1a73e8",
"assistantMessage": "#f1f3f4"
},
"cta": {
"headline": "<string>",
"body": "<string>",
"buttonText": "<string>",
"buttonUrl": "<string>"
},
"name": "<string>",
"logo": "<string>",
"avatar": "<string>",
"chatName": "<string>",
"chatGreeting": "<string>",
"fonts": {},
"contact": {
"phone": "<string>",
"email": "jsmith@example.com"
}
}
'import requests
url = "https://app.demand-iq.com/api/decks/{deckId}/branding"
payload = {
"palette": {
"primary": "#1a73e8",
"primaryLight": "#4a9af5",
"accent": "#fbbc04",
"neutral": "#5f6368",
"text": "#202124",
"userMessage": "#1a73e8",
"assistantMessage": "#f1f3f4"
},
"cta": {
"headline": "<string>",
"body": "<string>",
"buttonText": "<string>",
"buttonUrl": "<string>"
},
"name": "<string>",
"logo": "<string>",
"avatar": "<string>",
"chatName": "<string>",
"chatGreeting": "<string>",
"fonts": {},
"contact": {
"phone": "<string>",
"email": "jsmith@example.com"
}
}
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
palette: {
primary: '#1a73e8',
primaryLight: '#4a9af5',
accent: '#fbbc04',
neutral: '#5f6368',
text: '#202124',
userMessage: '#1a73e8',
assistantMessage: '#f1f3f4'
},
cta: {
headline: '<string>',
body: JSON.stringify('<string>'),
buttonText: '<string>',
buttonUrl: '<string>'
},
name: '<string>',
logo: '<string>',
avatar: '<string>',
chatName: '<string>',
chatGreeting: '<string>',
fonts: {},
contact: {phone: '<string>', email: 'jsmith@example.com'}
})
};
fetch('https://app.demand-iq.com/api/decks/{deckId}/branding', 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.demand-iq.com/api/decks/{deckId}/branding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'palette' => [
'primary' => '#1a73e8',
'primaryLight' => '#4a9af5',
'accent' => '#fbbc04',
'neutral' => '#5f6368',
'text' => '#202124',
'userMessage' => '#1a73e8',
'assistantMessage' => '#f1f3f4'
],
'cta' => [
'headline' => '<string>',
'body' => '<string>',
'buttonText' => '<string>',
'buttonUrl' => '<string>'
],
'name' => '<string>',
'logo' => '<string>',
'avatar' => '<string>',
'chatName' => '<string>',
'chatGreeting' => '<string>',
'fonts' => [
],
'contact' => [
'phone' => '<string>',
'email' => 'jsmith@example.com'
]
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"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.demand-iq.com/api/decks/{deckId}/branding"
payload := strings.NewReader("{\n \"palette\": {\n \"primary\": \"#1a73e8\",\n \"primaryLight\": \"#4a9af5\",\n \"accent\": \"#fbbc04\",\n \"neutral\": \"#5f6368\",\n \"text\": \"#202124\",\n \"userMessage\": \"#1a73e8\",\n \"assistantMessage\": \"#f1f3f4\"\n },\n \"cta\": {\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"buttonUrl\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"avatar\": \"<string>\",\n \"chatName\": \"<string>\",\n \"chatGreeting\": \"<string>\",\n \"fonts\": {},\n \"contact\": {\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "session=")
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.put("https://app.demand-iq.com/api/decks/{deckId}/branding")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"palette\": {\n \"primary\": \"#1a73e8\",\n \"primaryLight\": \"#4a9af5\",\n \"accent\": \"#fbbc04\",\n \"neutral\": \"#5f6368\",\n \"text\": \"#202124\",\n \"userMessage\": \"#1a73e8\",\n \"assistantMessage\": \"#f1f3f4\"\n },\n \"cta\": {\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"buttonUrl\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"avatar\": \"<string>\",\n \"chatName\": \"<string>\",\n \"chatGreeting\": \"<string>\",\n \"fonts\": {},\n \"contact\": {\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/decks/{deckId}/branding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"palette\": {\n \"primary\": \"#1a73e8\",\n \"primaryLight\": \"#4a9af5\",\n \"accent\": \"#fbbc04\",\n \"neutral\": \"#5f6368\",\n \"text\": \"#202124\",\n \"userMessage\": \"#1a73e8\",\n \"assistantMessage\": \"#f1f3f4\"\n },\n \"cta\": {\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"buttonUrl\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"avatar\": \"<string>\",\n \"chatName\": \"<string>\",\n \"chatGreeting\": \"<string>\",\n \"fonts\": {},\n \"contact\": {\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"branding": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deckId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"palette": {
"primary": "#1a73e8",
"primaryLight": "#4a9af5",
"accent": "#fbbc04",
"neutral": "#5f6368",
"text": "#202124",
"userMessage": "#1a73e8",
"assistantMessage": "#f1f3f4"
},
"cta": {
"headline": "<string>",
"body": "<string>",
"buttonText": "<string>",
"buttonUrl": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"logo": "<string>",
"avatar": "<string>",
"chatName": "<string>",
"chatGreeting": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session cookie obtained from POST /api/auth/login.
Path Parameters
UUID of the deck
Body
application/json
Response
Saved branding
Show child attributes
Show child attributes