---
title: "Add a mashup to a device playlist"
method: POST
path: "/api/devices/{device_id}/mashups"
tags: ["Mashups"]
---

# Add a mashup to a device playlist

`POST /api/devices/{device_id}/mashups`

## Request

- Base URL: `https://trmnl.com`
- URL: `https://trmnl.com/api/devices/{device_id}/mashups`
- Auth: HTTP bearer

Splits one screen between plugin settings. getDevice lists the layouts the device can show and the positions each layout has. The 1x1 layout adds a plain playlist item instead of a mashup.

## Path parameters

- `device_id` integer, required

## Request body

- object
  - `layout` '1x1' | '1Tx1B' | '1Lx1R' | '1Tx2B' | '2Tx1B' | '1Lx2R' | '2Lx1R' | '2x2' | '3x3', required: One of the layouts getDevice lists for the device
  - `grid_config` object[], nullable: The cells of a 3x3 layout only
    - `pos` string
    - `col` integer
    - `row` integer
    - `cs` integer
    - `rs` integer
  - `contents` object, required: Plugin setting id by position; a position left out renders empty

## Response `200`

Added to the playlist

- object
  - `data` PlaylistItem
    - `presentation` object
    - `created_at` string, date_time
    - `configuration_state` 'configured' | 'needs_configuration'
    - `device_id` integer
    - `id` integer
    - `mashup_id` integer, nullable
    - `mirror` boolean
    - `plugin` object, nullable
      - `id` integer
      - `name` string
      - `keyname` string
      - `description` string, nullable
      - `image` string, nullable
      - `image_dark` string, nullable
    - `plugin_id` integer, nullable
    - `plugin_setting` PluginSetting
      - `sync` PluginSync
        - `source_kinds` string[], required
        - `upload_allowed` boolean, required
        - `reason` string, nullable
        - `action_id` string, nullable
      - `id` integer
      - `name` string
      - `description` string, nullable
      - `plugin_id` integer
      - `refresh_interval` integer, nullable: Minutes between renders
      - `health_notification_enabled` boolean
      - `icon_url` string, nullable
      - `icon_content_type` string, nullable
      - `read_only?` boolean
      - `strategy` string, nullable
    - `plugin_setting_id` integer, nullable
    - `rendered_at` string, date_time, nullable
    - `row_order` integer
    - `updated_at` string, date_time
    - `visible` boolean
    - `palette_id` string, nullable: Overrides the device palette for this item
    - `font_family` string, nullable
    - `text_scale` string, nullable
    - `theme` string, nullable

## Other responses

- `401`: Unauthorized
- `404`: Device belongs to another user
- `422`: A layout that does not exist

---

[API](https://skmtc.dev/trmnl/apis/trmnl-api.md) · [All operations](https://skmtc.dev/trmnl/apis/trmnl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trmnl/apis/trmnl-api/revisions/66179e6d663b?raw)
