Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
theme = client.themes.create(
account_id="account_id",
logo_blob="logo_blob",
theme_vars={},
title="title",
)
print(theme.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
theme, err := client.Themes.New(context.TODO(), sgp.ThemeNewParams{
AccountID: sgp.F("account_id"),
LogoBlob: sgp.F("logo_blob"),
ThemeVars: sgp.F(sgp.ThemeNewParamsThemeVars{}),
Title: sgp.F("title"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", theme.ID)
}curl --request POST \
--url https://api.egp.scale.com/v4/themes \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"theme_vars": {
"accentPrimary": "<string>",
"accentSecondary": "<string>",
"background": "<string>",
"foreground": "<string>"
},
"logo_blob": "<string>",
"account_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
theme_vars: {
accentPrimary: '<string>',
accentSecondary: '<string>',
background: '<string>',
foreground: '<string>'
},
logo_blob: '<string>',
account_id: '<string>'
})
};
fetch('https://api.egp.scale.com/v4/themes', 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.egp.scale.com/v4/themes",
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([
'title' => '<string>',
'theme_vars' => [
'accentPrimary' => '<string>',
'accentSecondary' => '<string>',
'background' => '<string>',
'foreground' => '<string>'
],
'logo_blob' => '<string>',
'account_id' => '<string>'
]),
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;
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/themes")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"theme_vars\": {\n \"accentPrimary\": \"<string>\",\n \"accentSecondary\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\"\n },\n \"logo_blob\": \"<string>\",\n \"account_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"theme_vars\": {\n \"accentPrimary\": \"<string>\",\n \"accentSecondary\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\"\n },\n \"logo_blob\": \"<string>\",\n \"account_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"theme_vars": {
"accentPrimary": "<string>",
"accentSecondary": "<string>",
"background": "<string>",
"foreground": "<string>"
},
"logo_blob": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"account_id": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Chat Themes
Create Theme
Description
Custom chat themes
POST
/
v4
/
themes
Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
theme = client.themes.create(
account_id="account_id",
logo_blob="logo_blob",
theme_vars={},
title="title",
)
print(theme.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
theme, err := client.Themes.New(context.TODO(), sgp.ThemeNewParams{
AccountID: sgp.F("account_id"),
LogoBlob: sgp.F("logo_blob"),
ThemeVars: sgp.F(sgp.ThemeNewParamsThemeVars{}),
Title: sgp.F("title"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", theme.ID)
}curl --request POST \
--url https://api.egp.scale.com/v4/themes \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"theme_vars": {
"accentPrimary": "<string>",
"accentSecondary": "<string>",
"background": "<string>",
"foreground": "<string>"
},
"logo_blob": "<string>",
"account_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
theme_vars: {
accentPrimary: '<string>',
accentSecondary: '<string>',
background: '<string>',
foreground: '<string>'
},
logo_blob: '<string>',
account_id: '<string>'
})
};
fetch('https://api.egp.scale.com/v4/themes', 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.egp.scale.com/v4/themes",
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([
'title' => '<string>',
'theme_vars' => [
'accentPrimary' => '<string>',
'accentSecondary' => '<string>',
'background' => '<string>',
'foreground' => '<string>'
],
'logo_blob' => '<string>',
'account_id' => '<string>'
]),
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;
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/themes")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"theme_vars\": {\n \"accentPrimary\": \"<string>\",\n \"accentSecondary\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\"\n },\n \"logo_blob\": \"<string>\",\n \"account_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"theme_vars\": {\n \"accentPrimary\": \"<string>\",\n \"accentSecondary\": \"<string>\",\n \"background\": \"<string>\",\n \"foreground\": \"<string>\"\n },\n \"logo_blob\": \"<string>\",\n \"account_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"theme_vars": {
"accentPrimary": "<string>",
"accentSecondary": "<string>",
"background": "<string>",
"foreground": "<string>"
},
"logo_blob": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"account_id": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
The date and time when the entity was created in ISO format.
The date and time when the entity was last updated in ISO format.
The user who originally created the entity.
The type of identity that created the entity.
Available options:
user, service_account The ID of the account that owns the given entity.
The date and time when the entity was archived in ISO format.
⌘I

