# Update a status page design template — API reference

> Updates a status page design template with an expected revision and design specification.

Source: https://upfour.io/docs/api/status-page-design-templates/update-a-status-page-design-template

[Developers](https://upfour.io/docs/api.md)/[Status page design templates](https://upfour.io/docs/api/status-page-design-templates.md)

Updates a status page design template with an expected revision and design specification.

PUT https://app.upfour.io/v1/status-page-design-templates/{templateID}

scope status_page.write stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `templateID` required | uuid | path parameter |

## Body

`application/json` optional 7 fields

expected_revisioninteger (required)

The revision the caller last read. A template that changed since answers 409 with code design_template_conflict.

namestring (required)

At most 80 characters.

specStatusPageDesignTemplateSpec (required)

The look of a page, at most 80 KiB. Unknown keys are refused; version must be 1 and appearance is required.

Nested fields 12 fields

| Field | Type | Description |
| --- | --- | --- |
| `accent_color` optional | string | #RRGGBB or empty for the platform default. |
| `appearance` optional | StatusPageAppearance | |
| StatusPageAppearance · 5 fields FieldTypeDescription `ground` optional string one of`paper` `white` `cool` Empty is stored as paper. `header_dark` optional string #RRGGBB or empty for the platform default. `header_light` optional string #RRGGBB or empty for the platform default. `layout` optional string one of`essential` `brand` `overview` `version` optional integer Must be 1. | | |
| `custom_css` optional | string | At most 64 KiB; must not contain </style. |
| `includes_css` optional | boolean | Must be true for custom_css to be non-empty. |
| `logo_url` optional | string | External logo address, copied as text and never downloaded; only kept together with brand images. |
| `theme` optional | string one of`system` `light` `dark` | Empty is stored as system. |
| `version` optional | integer | |

All other fields4 fields

asset_source_page_iduuid · nullable

Copy the brand images (and the logo URL) from this status page. At most one of asset_source_page_id, asset_source_template_id and keep_assets.

asset_source_template_iduuid · nullable

Copy the brand images (and the logo URL) from another template of the company.

descriptionstring

At most 240 characters.

keep_assetsboolean

Update only: keep the template's own images. An update without any image source removes them.

## Returns

A successful request returns `200` with application/json.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | StatusPageDesignTemplate | |
| StatusPageDesignTemplate · 32 fields FieldTypeDescription `accent_color` string `asset_kinds` string[]  · nullable one of`logo` `logo_dark` `favicon` The images the template stores, in the order logo, logo_dark, favicon. `assets` StatusPageDesignTemplateAssetInfo[]  · nullable Each item · 4 fields FieldTypeDescription `content_type` string `kind` string one of`logo` `logo_dark` `favicon` `sha256` string `size_bytes` integer `created_at` string (date-time) `description` string `ground` string one of`paper` `white` `cool` `header_dark` string `header_light` string `id` uuid `includes_css` boolean `layout` string one of`essential` `brand` `overview` `name` string `revision` integer Starts at 1 and rises with every update. `spec` StatusPageDesignTemplateSpecResponse StatusPageDesignTemplateSpecResponse · 12 fields FieldTypeDescription `accent_color` string #RRGGBB or empty for the platform default. `appearance` StatusPageAppearanceResponse StatusPageAppearanceResponse · 5 fields FieldTypeDescription `ground` string one of`paper` `white` `cool` Empty is stored as paper. `header_dark` string #RRGGBB or empty for the platform default. `header_light` string #RRGGBB or empty for the platform default. `layout` string one of`essential` `brand` `overview` `version` integer Must be 1. `custom_css` string At most 64 KiB; must not contain </style. `includes_css` boolean Must be true for custom_css to be non-empty. `logo_url` string External logo address, copied as text and never downloaded; only kept together with brand images. `theme` string one of`system` `light` `dark` Empty is stored as system. `version` integer `theme` string one of`system` `light` `dark` `updated_at` string (date-time) | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 409 | [design_template_conflict](https://upfour.io/docs/api/errors#code-design_template_conflict) | The design template was changed after the caller read it. **When:** Updating or applying a design template that was changed after the caller read it. **Fix:** Reload the template and apply the change again. |
| 404 | [design_template_not_found](https://upfour.io/docs/api/errors#code-design_template_not_found) | The design template does not exist or is not visible to the caller. **When:** A design template id in the path or body that is unknown or not visible to the caller. **Fix:** List design templates and use an id from the list. |
| 404 | [not_found](https://upfour.io/docs/api/errors#code-not_found) | The requested resource does not exist or is outside the caller's scope. |
| 403 | [permission_denied](https://upfour.io/docs/api/errors#code-permission_denied) | The credentials do not permit this action. |
| 200 / 410 / 413 / 422 | [request_failed](https://upfour.io/docs/api/errors#code-request_failed) | The request could not be completed. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousGet a status page design template](https://upfour.io/docs/api/status-page-design-templates/get-a-status-page-design-template.md) [NextGet a status page design template asset](https://upfour.io/docs/api/status-page-design-templates/get-a-status-page-design-template-asset.md)

## Request

### cURL

```bash
curl -s -X PUT "https://app.upfour.io/v1/status-page-design-templates/00000000-0000-4000-8000-000000000001" \
  -H "Authorization: Bearer $UP4_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expected_revision": 1,
    "keep_assets": true,
    "name": "Acme blue",
    "spec": {
      "appearance": {
        "ground": "paper",
        "header_dark": "#7A9BFF",
        "header_light": "#294E9E",
        "layout": "brand",
        "version": 1
      },
      "version": 1
    }
  }'
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/status-page-design-templates/00000000-0000-4000-8000-000000000001", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    expected_revision: 1,
    keep_assets: true,
    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

```python
import os
import requests

res = requests.put(
    "https://app.upfour.io/v1/status-page-design-templates/00000000-0000-4000-8000-000000000001",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
    json={
        "expected_revision": 1,
        "keep_assets": True,
        "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

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	payload := strings.NewReader(`{
  "expected_revision": 1,
  "keep_assets": true,
  "name": "Acme blue",
  "spec": {
    "appearance": {
      "ground": "paper",
      "header_dark": "#7A9BFF",
      "header_light": "#294E9E",
      "layout": "brand",
      "version": 1
    },
    "version": 1
  }
}`)
	req, _ := http.NewRequest("PUT", "https://app.upfour.io/v1/status-page-design-templates/00000000-0000-4000-8000-000000000001", 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
<?php
$payload = <<<'JSON'
{
  "expected_revision": 1,
  "keep_assets": true,
  "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/00000000-0000-4000-8000-000000000001");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PUT",
    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

### 200

```json
{
  "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": "",
    "ground": "paper",
    "header_dark": "#7a9bff",
    "header_light": "#294e9e",
    "id": "00000000-0000-4000-8000-000000000001",
    "includes_css": false,
    "layout": "brand",
    "name": "Acme blue",
    "revision": 2,
    "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

```json
{
  "error": {
    "code": "request_failed",
    "message": "The request could not be completed.",
    "request_id": "req_…"
  }
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 403

```json
{
  "error": {
    "code": "permission_denied",
    "message": "The credentials do not permit this action.",
    "request_id": "req_…"
  }
}
```

### 404

```json
{
  "error": {
    "code": "design_template_not_found",
    "message": "The design template does not exist or is not visible to the caller.",
    "request_id": "req_…"
  }
}
```

### 409

```json
{
  "error": {
    "code": "design_template_conflict",
    "message": "The design template was changed after the caller read it.",
    "request_id": "req_…"
  }
}
```

### 410

```json
{
  "error": {
    "code": "request_failed",
    "message": "The request could not be completed.",
    "request_id": "req_…"
  }
}
```

### 413

```json
{
  "error": {
    "code": "request_failed",
    "message": "The request could not be completed.",
    "request_id": "req_…"
  }
}
```

### 422

```json
{
  "error": {
    "code": "request_failed",
    "message": "The request could not be completed.",
    "request_id": "req_…"
  }
}
```
