# Upload a status page asset — API reference

> Uploads a status-page asset for the selected kind and returns the updated page.

Source: https://upfour.io/docs/api/status-pages/upload-a-status-page-asset

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

Uploads a status-page asset for the selected kind and returns the updated page.

PUT https://app.upfour.io/v1/status-pages/{pageID}/assets/{kind}

scope status_page.write stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `pageID` required | uuid | path parameter |
| `kind` required | string one of`logo` `logo_dark` `favicon` | path parameter |

## Body

`multipart/form-data` required

filefile (required)

## Returns

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

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | StatusPage | |
| StatusPage · 61 fields FieldTypeDescription `accent_color` string `announcement` string `appearance` StatusPageAppearanceResponse  · nullable null until a layout was chosen; the page then renders the default design (essential layout, paper ground). 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. `automatic_reports` boolean `automatic_reports_notify` boolean `company_name` string `company_url` string `contact_url` string `created_at` string (date-time) `custom_css` string `custom_domain` string `custom_domain_certificate_status` string one of`none` `pending` `issued` `failed` `unknown` `custom_domain_status` string one of`none` `pending_dns` `queued` `provisioning` `active` `failed` `disabled` `conflict_requires_review` `custom_js` string Not supported: always empty. `default_language` string  · nullable Language of the page's own communication; null inherits from the client, then the company default. `design` string No effect since Plan 82; accepted and stored only. `google_tag_id` string Not supported: always empty. `header_layout` string No effect since Plan 82; accepted and stored only. `hide_from_search_engines` boolean `history_days` integer `id` uuid `is_published` boolean `logo_url` string `minimum_incident_length` integer `organization_id` uuid `password_protected` boolean `remove_branding` boolean `show_not_monitored_as_green` boolean `subdomain` string `subscribable` boolean `theme` string `timezone` string `updated_at` string (date-time) `uptime_decimals` integer `access_restricted` boolean Whether any visitor gate (password, e-mail codes, IP allowlist or access token) is on. Only in GET /status-pages. `auto_report_open_template_id` uuid `auto_report_resolve_template_id` uuid `client_id` uuid `custom_domain_attempts` integer `custom_domain_cleanup_requested_at` string (date-time) `custom_domain_dns_target` string `custom_domain_error` string `custom_domain_last_checked_at` string (date-time) `custom_domain_next_retry_at` string (date-time) `custom_domain_pending_expires_at` string (date-time) `custom_domain_ploi_tenant` string `custom_domain_provisioned_at` string (date-time) `custom_domain_verification_token` string Value of the up4-status-verification TXT record that proves ownership of the domain. `custom_domain_verified_at` string (date-time) `favicon_url` string `logo_asset_url` string `logo_dark_asset_url` string `platform_url` string `public_url` string Where the page is reachable: the custom domain once active, else the platform address. `reply_to_email` string `subscriber_count` integer Confirmed, active subscribers. Only in GET /status-pages. | | |

## 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. |
| 400 | [file_empty](https://upfour.io/docs/api/errors#code-file_empty) | The uploaded file is empty. **When:** Uploading a logo or image with no content. **Fix:** Upload a file that has content. Stable codes next to the English message when a logo is refused: `file_empty`, `file_type_unsupported` (`error.details.formats` lists the accepted ones), `image_invalid` (damaged or unreadable), `image_dimensions_too_large` (`error.details.max_pixels`), `svg_unsafe`. `upload_no_file` (the form has no `file` part) and `upload_invalid` (the upload could not be read) apply to multipart uploads. |
| 413 | [file_too_large](https://upfour.io/docs/api/errors#code-file_too_large) | The uploaded file is over the size limit. **When:** Uploading a logo or image larger than details.max_bytes. **Fix:** Reduce the file size and upload again. `file_too_large`: the logo or favicon is larger than 256 KB (`error.details.max_bytes`). A proxy in front of the API may answer 413 with a plain HTML body and no code. |
| 400 | [file_type_unsupported](https://upfour.io/docs/api/errors#code-file_type_unsupported) | The file's type is not accepted for this upload. **When:** Uploading a file whose type is not one of the formats the operation accepts; details.formats lists them. **Fix:** Upload a file in one of details.formats. |
| 400 | [image_dimensions_too_large](https://upfour.io/docs/api/errors#code-image_dimensions_too_large) | The image has more pixels than allowed. **When:** Uploading an image with more pixels than details.max_pixels. **Fix:** Scale the image down and upload it again. |
| 400 | [image_invalid](https://upfour.io/docs/api/errors#code-image_invalid) | The file is not a readable image. **When:** Uploading a file with an image type that cannot be decoded. **Fix:** Export the image again and upload the new file. |
| 400 | [logo_fetch_failed](https://upfour.io/docs/api/errors#code-logo_fetch_failed) | The logo could not be fetched from the address given. **When:** Importing a client logo from a URL that cannot be reached or that does not return an acceptable image. **Fix:** Check the URL, or upload the logo file instead. |
| 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. |
| 400 | [svg_unsafe](https://upfour.io/docs/api/errors#code-svg_unsafe) | The SVG contains content that is not allowed. **When:** Uploading an SVG that contains a script, a foreignObject, a javascript: URL, an event-handler attribute or an external href. **Fix:** Remove those parts from the SVG, or upload a PNG or JPEG. |
| 400 | [upload_invalid](https://upfour.io/docs/api/errors#code-upload_invalid) | The upload could not be read as a multipart form. **When:** A body that is not a valid multipart form, or whose file cannot be parsed. **Fix:** Send a well-formed multipart/form-data request. |
| 400 | [upload_no_file](https://upfour.io/docs/api/errors#code-upload_no_file) | The multipart request has no file part. **When:** An upload request without a file field. **Fix:** Send the file as multipart/form-data in the field the operation names. |

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).

[PreviousDelete a status page asset](https://upfour.io/docs/api/status-pages/delete-a-status-page-asset.md) [NextRemove a custom domain](https://upfour.io/docs/api/status-pages/remove-a-custom-domain.md)

## Request

### cURL

```bash
curl -s -X PUT "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/assets/logo" \
  -H "Authorization: Bearer $UP4_API_KEY" \
  -F "file=@./file.png"
```

### JavaScript

```javascript
import { readFile } from "node:fs/promises";

const fileBytes = await readFile("./file.png");

const form = new FormData();
form.append("file", new Blob([fileBytes]), "file.png");

const res = await fetch("https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/assets/logo", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
  },
  body: form,
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.put(
    "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/assets/logo",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
    files={"file": open("./file.png", "rb")},
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"mime/multipart"
	"net/http"
	"os"
)

func main() {
	var buf bytes.Buffer
	w := multipart.NewWriter(&buf)
	part, _ := w.CreateFormFile("file", "file.png")
	file, _ := os.Open("./file.png")
	io.Copy(part, file)
	w.Close()
	req, _ := http.NewRequest("PUT", "https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/assets/logo", &buf)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	req.Header.Set("Content-Type", w.FormDataContentType())
	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
$ch = curl_init("https://app.upfour.io/v1/status-pages/00000000-0000-4000-8000-000000000001/assets/logo");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
    ],
    CURLOPT_POSTFIELDS => ["file" => new CURLFile("./file.png")],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": {
    "accent_color": "",
    "announcement": "Planned maintenance on Sunday from 02:00 to 03:00 UTC.",
    "appearance": null,
    "automatic_reports": false,
    "automatic_reports_notify": false,
    "company_name": "Acme GmbH",
    "company_url": "",
    "contact_url": "",
    "created_at": "2026-10-27T09:00:00Z",
    "custom_css": "",
    "custom_domain": "",
    "custom_domain_certificate_status": "none",
    "custom_domain_dns_target": "pages.example.test",
    "custom_domain_pending_expires_at": "2026-11-10T09:00:00Z",
    "custom_domain_status": "none",
    "custom_js": "",
    "default_language": null,
    "design": "v2",
    "google_tag_id": "",
    "header_layout": "vertical",
    "hide_from_search_engines": false,
    "history_days": 90,
    "id": "00000000-0000-4000-8000-000000000001",
    "is_published": false,
    "logo_asset_url": "https://example.com/v1/public/status/assets/00000000-0000-4000-8000-000000000002?v=c414cd0e204d",
    "logo_url": "",
    "minimum_incident_length": 0,
    "organization_id": "00000000-0000-4000-8000-000000000003",
    "password_protected": false,
    "platform_url": "https://example.com",
    "public_url": "https://example.com",
    "remove_branding": false,
    "show_not_monitored_as_green": false,
    "subdomain": "acme-status",
    "subscribable": false,
    "theme": "light",
    "timezone": "UTC",
    "updated_at": "2026-10-27T09:00:00Z",
    "uptime_decimals": 0
  }
}
```

### 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": "not_found",
    "message": "The requested resource does not exist or is outside the caller's scope.",
    "request_id": "req_…"
  }
}
```

### 413

```json
{
  "error": {
    "code": "file_too_large",
    "message": "The uploaded file is over the size limit.",
    "request_id": "req_…"
  }
}
```
