> ## Documentation Index
> Fetch the complete documentation index at: https://docs.littledemo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload a custom presentation background

` POST /api/v1/backgrounds/upload `

Upload a custom presentation background

## Servers

- ` https://littledemo.com ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` bearerAuth `: ` http `

  - HTTP scheme: ` bearer `

  - Live API key, for example `Authorization: Bearer ld_live_...`.

### Alternative 2

- ` cookieAuth `: ` apiKey `

  - Credential: ` better-auth.session_token ` in ` cookie `

  - Dashboard session cookie.

## Request body (optional)

Content type: ` multipart/form-data `

- ` value `: type ` object `

  - Required fields: ` file `

  - ` file `: type ` string `; format ` binary `

## Responses

### ` 201 ` — Background uploaded

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` id `, ` key `, ` imageUrl `

  - ` id `: type ` string `

  - ` key `: type ` string `

  - ` imageUrl `: type ` string `

### ` 400 ` — Invalid or missing file

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

### ` 401 ` — Unauthorized

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X POST 'https://littledemo.com/api/v1/backgrounds/upload' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "file": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://littledemo.com/api/v1/backgrounds/upload', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "file": "string"
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://littledemo.com/api/v1/backgrounds/upload', headers=headers, json={
  "file": "string"
})
print(response.json())
```