---
search:
  tags:
    - Themes
    - POST
seo:
  description: >-
    Uploads a new static asset (image, font, etc.) to a theme. The file data
    must… Reference for the POST /themes/{theme_id}/assets endpoint in the
    Bolder API v1.
sidebar:
  label: Upload theme asset
  badge: POST
title: Upload theme asset
type: openapi-operation
---
Uploads a new static asset (image, font, etc.) to a theme. The file data must be
Base64-encoded. Requires `admin` scope.

`POST /themes/{theme_id}/assets`

**Request body** (`application/json`, required)

- `file_name` (string, required)
- `data` (string, required) — Base64-encoded file data URI

Request body example:

```json
{
  "file_name": "logo.png",
  "data": "data:image/png;base64,iVBORw0KGgoAAAANS..."
}
```

**Responses**

- `201` — Asset uploaded

Response example, 201:

```json
{
  "id": "string",
  "file_name": "string",
  "content_type": "string",
  "file_size": 0,
  "digest": "string",
  "updated_on": "2019-08-24T14:15:22Z",
  "_links": {
    "file": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    }
  }
}
```
