# Get playlist
URL: https://musicapi.com/docs/reference/get-playlist.md

`GET https://api.musicapi.com/api/{integrationUserUUID}/playlists/{playlistId}`

Section: Read and write a user's library.
Product: MusicAPI Core.
Auth: Basic, DevToken, DocsSession (any one of them). Use Basic with your Client ID and Client Secret from your server only.

This endpoint fetches specified playlist and returns information about it.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `integrationUserUUID` | uuid | yes | The connected user: the `integrationUserUUID` from the sign-in callback. |
| `playlistId` | string | yes | ID of the playlist |

## Response 200

ok

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |
| `id` | string | yes |  |
| `totalItems` | number \| null | yes |  |
| `imageUrl` | string \| null | yes |  |
| `dateAdded` | string \| null | no |  |
| `isOwner` | boolean | yes |  |

```json
{
  "name": "Viva Playlist",
  "id": "1",
  "totalItems": 25,
  "imageUrl": "https://www.example-image.com/978263478234",
  "dateAdded": "2024-10-16T07:52:07.000Z",
  "isOwner": true
}
```

## Errors

- 404: Your account has no connected user with this uuid, or the item does not exist.
- 412: The user must sign in again (`IntegrationUserNotAuthenticated`).
- 429: Too many requests. Wait for the seconds in `Retry-After`.

## Example

```bash
curl https://api.musicapi.com/api/{integrationUserUUID}/playlists/{playlistId} \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET"
```
