---
# System prepended metadata

title: FAVORITES API DOC

---

# FAVORITES API DOC


## INDEX

`GET api/v2/users/me/favorites`
Return user favorite medias  ordered by favorite created_at AND last_used at 


### Response exemple

```
{
    results: [
        {
             results: [
                {
                    id: 30452,
                    type: "image"
                    name: "pexels-photo-3608618.jpeg"
                    status: "processed"
                    browser_url: "https://release.storage.playplay.com/uploads/722/a3e5fbafe7f2134c993efe3dbd9b8830/9177ac836484a7c51e68088643a8ec94.jpg"
                    thumbnail_url: "https://release.storage.playplay.com/uploads/722/a3e5fbafe7f2134c993efe3dbd9b8830/dc450d5b52792cc85da7401e2d2eeb2f.jpg"
                    data: {type: "image", subtype: "jpeg",…}
                    source: "pexels"
                    timestamp: "1585159188"
                    stock_id: 12345
                    credit: null
                    credit_url: null
                    duration: null
                    original_url: null
                    watermarked: null
                    width: 867
                    height: 1300
                    download_size: null,
                    is_favorite: true,
                },
                {
                    id: 30452,
                    type: "image"
                    name: "pexels-photo-3608618.jpeg"
                    status: "processed"
                    browser_url: "https://release.storage.playplay.com/uploads/722/a3e5fbafe7f2134c993efe3dbd9b8830/9177ac836484a7c51e68088643a8ec94.jpg"
                    thumbnail_url: "https://release.storage.playplay.com/uploads/722/a3e5fbafe7f2134c993efe3dbd9b8830/dc450d5b52792cc85da7401e2d2eeb2f.jpg"
                    data: {type: "image", subtype: "jpeg",…}
                    source: "upload"
                    timestamp: "1585159188"
                    stock_id: null
                    credit: null
                    credit_url: null
                    duration: null
                    original_url: null
                    watermarked: null
                    width: 867
                    height: 1300
                    download_size: null,
                    is_favorite: true,

                },
                ...
            ],
            next_page: 2,
            nb_results: 10
        }
    ]
    nb_results: 1

}
```
## STORE

`POST /api/v2/user/me/favorites`
### Parameters
|Attribute | Type | Mandatory |
| -------- | -------- | -------- |
| raw_media_id     | int     | ✅     |
| stock_id     | string     |    ❌  |
| source     | string     | ✅     |

### Response exemple

```
201 CREATED
{
    results: [
        {
            id: 30452,
            type: "image"
            name: "pexels-photo-3608618.jpeg"
            status: "processed"
            browser_url: "https://release.storage.playplay.com/uploads/722/a3e5fbafe7f2134c993efe3dbd9b8830/9177ac836484a7c51e68088643a8ec94.jpg"
            thumbnail_url: "https://release.storage.playplay.com/uploads/722/a3e5fbafe7f2134c993efe3dbd9b8830/dc450d5b52792cc85da7401e2d2eeb2f.jpg"
            data: {type: "image", subtype: "jpeg",…}
            source: "pexels"
            timestamp: "1585159188"
            stock_id: 12345
            credit: null
            credit_url: null
            duration: null
            original_url: null
            watermarked: null
            width: 867
            height: 1300
            download_size: null
            is_favorite: true,
        },
    ]
    nb_results: 1

}
```

## DELETE

`DELETE api/v2/users/me/favorites`
### Parameters
|Attribute | Type | Mandatory |
| -------- | -------- | -------- |
| raw_media_id     | int     | ✅ if no stock_id     |
| stock_id     | string     | ✅ if no raw_media_id     |
| source     | string     | ✅ if no raw_media_id     |

### Response exemple

```
204 NO CONTENT
```