Update White-label Config
PATCH /whitelabel/config
PATCH
/whitelabel/config
Update one or more branding fields. Hex colours validated as #RRGGBB; custom_domain validated as RFC-1035 subdomain. Setting custom_domain resets domain_verified=false — call /whitelabel/domain/verify after pointing your CNAME to api.astroway.info.
Authorizations
Section titled “Authorizations ”Code Samples
Section titled “ Code Samples ”curl -X PATCH https://api.astroway.info/v1/whitelabel/config \ -H "X-Api-Key: aw_live_..." \ -H "Content-Type: application/json" \ -d '{ "primary_color": "#0a0b1e", "footer_text": "© 2026 MyAstroBrand", "custom_domain": "api.myastrobrand.com" }'const res = await fetch('https://api.astroway.info/v1/whitelabel/config', { method: 'PATCH', headers: { 'X-Api-Key': process.env.ASTROWAY_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "primary_color": "#0a0b1e", "footer_text": "© 2026 MyAstroBrand", "custom_domain": "api.myastrobrand.com" }),});const { ok, data, error } = await res.json();if (!ok) throw new Error(error.message);console.log(data);import os, requests
r = requests.patch( 'https://api.astroway.info/v1/whitelabel/config', headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'}, json={ 'primary_color': "#0a0b1e", 'footer_text': "© 2026 MyAstroBrand", 'custom_domain': "api.myastrobrand.com" },)result = r.json()if not result['ok']: raise RuntimeError(result['error']['message'])print(result['data'])<?phpuse GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);$r = $client->patch('whitelabel/config', [ 'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')], 'json' => [ 'primary_color' => '#0a0b1e', 'footer_text' => '© 2026 MyAstroBrand', 'custom_domain' => 'api.myastrobrand.com', ],]);$result = json_decode($r->getBody(), true);if (!$result['ok']) throw new \RuntimeException($result['error']['message']);print_r($result['data']);Responses
Section titled “ Responses ”Successful calculation
object
ok
boolean
Example
true data
object
primary_color
string
secondary_color
string
font_family
string
footer_text
string
custom_domain
string
domain_verified
boolean
domain_last_checked_at
object
logo_storage_key
object
updated_at
string
Example
{ "ok": true, "data": { "primary_color": "#0a0b1e", "secondary_color": "#7e6bff", "font_family": "Inter", "footer_text": "© 2026 MyAstroBrand", "custom_domain": "api.myastrobrand.com", "domain_verified": false, "domain_last_checked_at": null, "logo_storage_key": null, "updated_at": "..." }}Validation error
Example
{ "ok": false, "error": { "code": "INVALID_INPUT", "message": "Validation failed: date: Date must be YYYY-MM-DD", "details": [ { "path": "date", "message": "Date must be YYYY-MM-DD" } ] }}Missing or invalid API key
Example
{ "ok": false, "error": { "code": "INVALID_API_KEY", "message": "Invalid API key" }} Корисно?
Дякуємо за фідбек.