---
title: "Set a color/gradient preset or upload a JPEG background"
method: POST
path: "/api/boards/{boardId}/background"
tags: ["Boards"]
---

# Set a color/gradient preset or upload a JPEG background

`POST /api/boards/{boardId}/background`

## Request

- Base URL: `https://tre-app.com`
- URL: `https://tre-app.com/api/boards/{boardId}/background`
- Auth: HTTP bearer

## Request body

- union
  - object
    - `kind` 'color', required
    - `value` '#f4ebd6' | '#e8f0e1' | '#e4ecf7' | '#f2e8f0' | '#fce8dc' | '#fef3c7' | '#e0f2f1' | '#f5d9e1' | '#dde7f2' | '#e7e4f7' | '#ece9e2' | '#fbe4e4', required
  - object
    - `kind` 'gradient', required
    - `value` 'linear-gradient(135deg, #e4ecf7 0%, #f2e8f0 100%)' | 'linear-gradient(135deg, #fce8dc 0%, #f5d9e1 100%)' | 'linear-gradient(135deg, #dff1ec 0%, #e4ecf7 100%)' | 'linear-gradient(135deg, #fbf3e0 0%, #f0e4d3 100%)' | 'linear-gradient(135deg, #fef3c7 0%, #fce8dc 100%)' | 'linear-gradient(135deg, #e7e4f7 0%, #dde7f2 100%)' | 'linear-gradient(135deg, #e8f0e1 0%, #fef3c7 100%)' | 'linear-gradient(135deg, #f5d9e1 0%, #e7e4f7 100%)', required

## Response `200`

Success

- Board
  - `id` string, uuid, required
  - `slug` string, required
  - `name` string, required
  - `title` string, required
  - `keyPrefix` string, required
  - `order` integer, required
  - `createdAt` string, date-time, required
  - `archivedAt` string, date-time, nullable, required
  - `backgroundKind` 'color' | 'gradient' | 'image', nullable, required
  - `backgroundValue` string, nullable, required
  - `isPrivate` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Unauthenticated
- `403`: Forbidden: insufficient role or token scope; scope denials name the held scope and the operation
- `404`: Not found
- `409`: Conflict
- `429`: Rate limited
- `500`: Internal server error
- `503`: Temporarily unavailable

---

[API](https://skmtc.dev/tre-app/apis/tre-rest-api.md) · [All operations](https://skmtc.dev/tre-app/apis/tre-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tre-app/apis/tre-rest-api/revisions/26a7187a05fc?raw)
