# Add to LINGTU music favorites

- API version: 1.11.0
- Last updated: 2026-11-16
- Server: `https://api.ailingtu.com`
- Web document: [Add to LINGTU music favorites](/en/openapi/favorite-music)
- Full schema: [JSON Schema](/en/openapi/operations/favoriteTikTokShopMusic.json)
- Discovery: [Operation index](/en/openapi/operations/index.json)

## POST /v1/creator/tiktokshop/music/favorite

Operation ID: `favoriteTikTokShopMusic`

Idempotently adds a track to the LINGTU music favorites library for TIKTOK_SHOP. This library is stored by LINGTU and is not a TikTok official favorite. Existing entries refresh non-empty title, author, duration, coverUrl and playUrl. Use coverThumb.urlList[0] and playUrl.urlList[0] from music search for URL snapshots.

Authentication: Request header `x-api-key: <YOUR_API_KEY>`; keep the key on the server and never expose it in client code, logs or shared files.

Success criteria: HTTP 2xx with code=0; for asynchronous tasks, also query the final status.

### Request parameters

| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| `musicId` | body | string | Yes | Platform music ID |
| `title` | body | string | No | Title; case-insensitive matching for favorites |
| `author` | body | string | No | Artist or author |
| `duration` | body | string | No | Duration snapshot |
| `coverUrl` | body | string | No | Cover URL snapshot |
| `playUrl` | body | string | No | Playback URL snapshot |

Request format: `application/json`

### Request example

```json
{
  "musicId": "7567668059796720391",
  "title": "Sunrise",
  "author": "Example artist",
  "duration": "30",
  "coverUrl": "https://cdn.example.com/music-cover.jpg",
  "playUrl": "https://cdn.example.com/music.mp3"
}
```

### Success response

```json
{
  "code": 0,
  "message": "success",
  "data": null,
  "timestamp": 1790640000000
}
```

### Response fields

Main levels are listed below. The endpoint JSON Schema is authoritative for the full structure, unions and validation rules; Required refers to the containing object.

| Field | Type | Required | Description |
|---|---|---|---|
| `code` | integer | No | — |
| `message` | string | No | — |
| `data` | null | No | — |
| `timestamp` | integer | No | — |

### Integration notes and limits

- The LINGTU favorites library is stored by LINGTU, not by TikTok, and is scoped to the current company, user and TIKTOK_SHOP platform.
- Idempotent: existing entries refresh non-empty title, author, duration, coverUrl and playUrl.
- Use coverThumb.urlList[0] and playUrl.urlList[0] from music search for URL snapshots; snapshots may expire, so publish with musicId.

### Related endpoints

- [List LINGTU music favorites](/en/openapi/favorite-music-list) · [Markdown](/en/openapi/operations/listTikTokShopFavoriteMusic.md)
- [Remove from LINGTU music favorites](/en/openapi/unfavorite-music) · [Markdown](/en/openapi/operations/unfavoriteTikTokShopMusic.md)
