Request cURL JS Python Go PHP
Copy request example cURL
curl -s -X POST "https://app.upfour.io/v1/status-page-design-templates" \
-H "Authorization: Bearer $UP4_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"asset_source_page_id": "00000000-0000-4000-8000-000000000001",
"description": "The look of the Acme status pages.",
"name": "Acme blue",
"spec": {
"appearance": {
"ground": "paper",
"header_dark": "#7A9BFF",
"header_light": "#294E9E",
"layout": "brand",
"version": 1
},
"version": 1
}
}'JavaScript
const res = await fetch("https://app.upfour.io/v1/status-page-design-templates", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.UP4_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
asset_source_page_id: "00000000-0000-4000-8000-000000000001",
description: "The look of the Acme status pages.",
name: "Acme blue",
spec: {
appearance: {
ground: "paper",
header_dark: "#7A9BFF",
header_light: "#294E9E",
layout: "brand",
version: 1,
},
version: 1,
},
}),
});
console.log(res.status, await res.json());Python
import os
import requests
res = requests.post(
"https://app.upfour.io/v1/status-page-design-templates",
headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
json={
"asset_source_page_id": "00000000-0000-4000-8000-000000000001",
"description": "The look of the Acme status pages.",
"name": "Acme blue",
"spec": {
"appearance": {
"ground": "paper",
"header_dark": "#7A9BFF",
"header_light": "#294E9E",
"layout": "brand",
"version": 1,
},
"version": 1,
},
},
)
print(res.status_code, res.json())Go
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
payload := strings.NewReader(`{
"asset_source_page_id": "00000000-0000-4000-8000-000000000001",
"description": "The look of the Acme status pages.",
"name": "Acme blue",
"spec": {
"appearance": {
"ground": "paper",
"header_dark": "#7A9BFF",
"header_light": "#294E9E",
"layout": "brand",
"version": 1
},
"version": 1
}
}`)
req, _ := http.NewRequest("POST", "https://app.upfour.io/v1/status-page-design-templates", payload)
req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}PHP
<?php
$payload = <<<'JSON'
{
"asset_source_page_id": "00000000-0000-4000-8000-000000000001",
"description": "The look of the Acme status pages.",
"name": "Acme blue",
"spec": {
"appearance": {
"ground": "paper",
"header_dark": "#7A9BFF",
"header_light": "#294E9E",
"layout": "brand",
"version": 1
},
"version": 1
}
}
JSON;
$ch = curl_init("https://app.upfour.io/v1/status-page-design-templates");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("UP4_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch); Response 201 200 400 403 404 409 410 413 422
Copy response example 201
{
"data": {
"accent_color": "",
"asset_kinds": [
"logo"
],
"assets": [
{
"content_type": "image/png",
"kind": "logo",
"sha256": "721378bc96ef2ddece4a66b447ba60d6a1266860d9cb23f4e0e6c152f30279cb",
"size_bytes": 70
}
],
"created_at": "2026-10-27T09:00:00Z",
"description": "The look of the Acme status pages.",
"ground": "paper",
"header_dark": "#7a9bff",
"header_light": "#294e9e",
"id": "00000000-0000-4000-8000-000000000002",
"includes_css": false,
"layout": "brand",
"name": "Acme blue",
"revision": 1,
"spec": {
"accent_color": "",
"appearance": {
"ground": "paper",
"header_dark": "#7a9bff",
"header_light": "#294e9e",
"layout": "brand",
"version": 1
},
"custom_css": "",
"includes_css": false,
"logo_url": "",
"theme": "system",
"version": 1
},
"theme": "system",
"updated_at": "2026-10-27T09:00:00Z"
}
} 200
{
"error": {
"code": "request_failed",
"message": "The request could not be completed.",
"request_id": "req_…"
}
} 400
{
"error": {
"code": "bad_request",
"message": "The request is malformed or fails validation.",
"request_id": "req_…"
}
} 403
{
"error": {
"code": "permission_denied",
"message": "The credentials do not permit this action.",
"request_id": "req_…"
}
} 404
{
"error": {
"code": "design_template_not_found",
"message": "The design template does not exist or is not visible to the caller.",
"request_id": "req_…"
}
} 409
{
"error": {
"code": "design_template_conflict",
"message": "The design template was changed after the caller read it.",
"request_id": "req_…"
}
} 410
{
"error": {
"code": "request_failed",
"message": "The request could not be completed.",
"request_id": "req_…"
}
} 413
{
"error": {
"code": "request_failed",
"message": "The request could not be completed.",
"request_id": "req_…"
}
} 422
{
"error": {
"code": "request_failed",
"message": "The request could not be completed.",
"request_id": "req_…"
}
}