curl --request PUT \
--url https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Brand-Id: <x-brand-id>' \
--data '
{
"display": {
"display_name": "<string>",
"logo": {
"dark": "<string>",
"light": "<string>"
},
"support_email": "[email protected]",
"tokens": {
"colors": {
"dark": {},
"light": {}
},
"radius": "<string>",
"typography": {
"fontMono": "<string>",
"fontSans": "<string>"
}
}
}
}
'import requests
url = "https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config"
payload = { "display": {
"display_name": "<string>",
"logo": {
"dark": "<string>",
"light": "<string>"
},
"support_email": "[email protected]",
"tokens": {
"colors": {
"dark": {},
"light": {}
},
"radius": "<string>",
"typography": {
"fontMono": "<string>",
"fontSans": "<string>"
}
}
} }
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Brand-Id': '<x-brand-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
display: {
display_name: '<string>',
logo: {dark: '<string>', light: '<string>'},
support_email: '[email protected]',
tokens: {
colors: {dark: {}, light: {}},
radius: '<string>',
typography: {fontMono: '<string>', fontSans: '<string>'}
}
}
})
};
fetch('https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config', 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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config",
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([
'display' => [
'display_name' => '<string>',
'logo' => [
'dark' => '<string>',
'light' => '<string>'
],
'support_email' => '[email protected]',
'tokens' => [
'colors' => [
'dark' => [
],
'light' => [
]
],
'radius' => '<string>',
'typography' => [
'fontMono' => '<string>',
'fontSans' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config"
payload := strings.NewReader("{\n \"display\": {\n \"display_name\": \"<string>\",\n \"logo\": {\n \"dark\": \"<string>\",\n \"light\": \"<string>\"\n },\n \"support_email\": \"[email protected]\",\n \"tokens\": {\n \"colors\": {\n \"dark\": {},\n \"light\": {}\n },\n \"radius\": \"<string>\",\n \"typography\": {\n \"fontMono\": \"<string>\",\n \"fontSans\": \"<string>\"\n }\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
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.put("https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display\": {\n \"display_name\": \"<string>\",\n \"logo\": {\n \"dark\": \"<string>\",\n \"light\": \"<string>\"\n },\n \"support_email\": \"[email protected]\",\n \"tokens\": {\n \"colors\": {\n \"dark\": {},\n \"light\": {}\n },\n \"radius\": \"<string>\",\n \"typography\": {\n \"fontMono\": \"<string>\",\n \"fontSans\": \"<string>\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display\": {\n \"display_name\": \"<string>\",\n \"logo\": {\n \"dark\": \"<string>\",\n \"light\": \"<string>\"\n },\n \"support_email\": \"[email protected]\",\n \"tokens\": {\n \"colors\": {\n \"dark\": {},\n \"light\": {}\n },\n \"radius\": \"<string>\",\n \"typography\": {\n \"fontMono\": \"<string>\",\n \"fontSans\": \"<string>\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand_id": "<string>",
"version": "<string>",
"commercial": {},
"copy": {},
"display": {
"display_name": "<string>",
"logo": {
"dark": "<string>",
"light": "<string>"
},
"support_email": "[email protected]",
"tokens": {
"colors": {
"dark": {},
"light": {}
},
"radius": "<string>",
"typography": {
"fontMono": "<string>",
"fontSans": "<string>"
}
}
},
"enabled_therapies": [
"<string>"
],
"redirect_allowlist": [
"<string>"
],
"theme": {},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"where": "<string>"
}
]
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Set your brand's display identity (client self-serve, configure plane)
Sets or updates YOUR brand’s display-identity block — the display name, the logo references, and the token-set the platform-controlled surfaces render — using your own API key. Display identity ONLY: the body’s display block is the only field read here, so the theme, the redirect allowlist, and the charge topology stay operator-controlled and cannot be set through this surface. The brand is the one your key owns (resolved from X-Brand-Id); the brand_id in the path must match it (any mismatch, foreign, or unknown brand answers 404, never 403). Validated UNCHANGED by the platform’s brand-config validator: a copy key, an unknown display key, a non-https and non-root-relative logo reference, or an unknown token slot is refused (422, issues verbatim). The version is server-minted; the write is durable before it activates and audited (which principal, when).
curl --request PUT \
--url https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Brand-Id: <x-brand-id>' \
--data '
{
"display": {
"display_name": "<string>",
"logo": {
"dark": "<string>",
"light": "<string>"
},
"support_email": "[email protected]",
"tokens": {
"colors": {
"dark": {},
"light": {}
},
"radius": "<string>",
"typography": {
"fontMono": "<string>",
"fontSans": "<string>"
}
}
}
}
'import requests
url = "https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config"
payload = { "display": {
"display_name": "<string>",
"logo": {
"dark": "<string>",
"light": "<string>"
},
"support_email": "[email protected]",
"tokens": {
"colors": {
"dark": {},
"light": {}
},
"radius": "<string>",
"typography": {
"fontMono": "<string>",
"fontSans": "<string>"
}
}
} }
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Brand-Id': '<x-brand-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
display: {
display_name: '<string>',
logo: {dark: '<string>', light: '<string>'},
support_email: '[email protected]',
tokens: {
colors: {dark: {}, light: {}},
radius: '<string>',
typography: {fontMono: '<string>', fontSans: '<string>'}
}
}
})
};
fetch('https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config', 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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config",
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([
'display' => [
'display_name' => '<string>',
'logo' => [
'dark' => '<string>',
'light' => '<string>'
],
'support_email' => '[email protected]',
'tokens' => [
'colors' => [
'dark' => [
],
'light' => [
]
],
'radius' => '<string>',
'typography' => [
'fontMono' => '<string>',
'fontSans' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config"
payload := strings.NewReader("{\n \"display\": {\n \"display_name\": \"<string>\",\n \"logo\": {\n \"dark\": \"<string>\",\n \"light\": \"<string>\"\n },\n \"support_email\": \"[email protected]\",\n \"tokens\": {\n \"colors\": {\n \"dark\": {},\n \"light\": {}\n },\n \"radius\": \"<string>\",\n \"typography\": {\n \"fontMono\": \"<string>\",\n \"fontSans\": \"<string>\"\n }\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
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.put("https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display\": {\n \"display_name\": \"<string>\",\n \"logo\": {\n \"dark\": \"<string>\",\n \"light\": \"<string>\"\n },\n \"support_email\": \"[email protected]\",\n \"tokens\": {\n \"colors\": {\n \"dark\": {},\n \"light\": {}\n },\n \"radius\": \"<string>\",\n \"typography\": {\n \"fontMono\": \"<string>\",\n \"fontSans\": \"<string>\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display\": {\n \"display_name\": \"<string>\",\n \"logo\": {\n \"dark\": \"<string>\",\n \"light\": \"<string>\"\n },\n \"support_email\": \"[email protected]\",\n \"tokens\": {\n \"colors\": {\n \"dark\": {},\n \"light\": {}\n },\n \"radius\": \"<string>\",\n \"typography\": {\n \"fontMono\": \"<string>\",\n \"fontSans\": \"<string>\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand_id": "<string>",
"version": "<string>",
"commercial": {},
"copy": {},
"display": {
"display_name": "<string>",
"logo": {
"dark": "<string>",
"light": "<string>"
},
"support_email": "[email protected]",
"tokens": {
"colors": {
"dark": {},
"light": {}
},
"radius": "<string>",
"typography": {
"fontMono": "<string>",
"fontSans": "<string>"
}
}
},
"enabled_therapies": [
"<string>"
],
"redirect_allowlist": [
"<string>"
],
"theme": {},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"where": "<string>"
}
]
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Authorizations
Per-client API key (M2M). Presented as Authorization: Bearer <key>.
Headers
Opaque brand id (brd_...). Validated to belong to the resolved client (§2).
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Accepted on mutations; carried in trusted context, enforced in a later WI.
Path Parameters
the brand whose display identity to set (must match X-Brand-Id).
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Body
The client self-serve display-write payload. The ONLY field is display: the client sets or updates its own brand display-identity block with its own API key. There is deliberately no theme, redirect-allowlist, or charge-topology field — those stay operator-controlled; a client cannot set them here (any such key is barred by additionalProperties:false and, at runtime, is never read). The block is merged onto the existing configuration and validated UNCHANGED by the brand-config validator (the wording wall: a copy key is refused 422, issues verbatim).
the per-brand display-identity block to set or update (merged onto the existing config).
Show child attributes
Show child attributes
Response
the stored configuration (the same projection you read back)
A brand's platform configuration as the platform holds it — clinically inert BY CONSTRUCTION (the validator enforces a top-level allowlist + a recursive clinical-shaped-key denylist). The client readback and the operator view return this EXACT shape (one projection, no drift). Presentation and commercial reach only; never a clinical field. additionalProperties:false mirrors the validator's top-level allowlist.
Show child attributes
Show child attributes