Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/listening/backfilllisteningimages

# Backfill listening images

POST `https://api.rewind.rest/v1/listening/admin/backfill-images`

Backfills missing images for albums and/or artists.

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Body

#### type (body, enum (string)) — allowed: albums, artists, all

#### limit (body, integer)

#### retry (body, boolean)

Retry albums/artists that previously failed (source=none placeholders)

#### artist (body, string)

Filter to a specific artist name (case-insensitive partial match)

## Response

#### 200

Backfill results

#### success (boolean, required)

#### results (object, required)

#### 400

Bad request

#### error (string, required)

#### status (integer, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X POST 'https://api.rewind.rest/v1/listening/admin/backfill-images' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"type": "albums", "limit": 50, "retry": true, "artist": "Beastie Boys"}'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/listening/admin/backfill-images', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"type": "albums", "limit": 50, "retry": true, "artist": "Beastie Boys"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.rewind.rest/v1/listening/admin/backfill-images',
    headers={'Authorization': 'Bearer <token>'},
    json={"type": "albums", "limit": 50, "retry": true, "artist": "Beastie Boys"}
)
data = res.json()
```

#### Response

```json 200
{
  "success": true,
  "results": {}
}
```

```json 400
{
  "error": "Not found",
  "status": 404
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```
