---
title: "Update a template using PUT. Full resource update."
method: PUT
path: "/templates/{id}"
tags: ["Templates"]
---

# Update a template using PUT. Full resource update.

`PUT /templates/{id}`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/templates/{id}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.reveldigital.com/connect/authorize`
    - Token URL: `https://id.reveldigital.com/connect/token` scopes: `webapi`
  - API key in header `X-RevelDigital-ApiKey`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/docs/templates/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Request body

- TemplateRequest: Request model for creating or updating a template. Used for partial updates via PATCH or full updates via PUT.
  - `name` string, nullable: Template name
  - `group_id` string, nullable: Group id
  - `tags` string, nullable: Tags (newline-delimited values stored in Description field)
  - `script` string, nullable: Template script
  - `back_color` string, nullable: Template background color
  - `width` integer, nullable: Width
  - `height` integer, nullable: Height
  - `orientation` integer, nullable: Orientation in degrees of rotation (0=Landscape, 90=Portrait, 180=Landscape Reversed, 270=Portrait Reversed)

## Response `200`

OK

- Template: Represents a screen layout template that defines the visual arrangement of content zones. Templates specify where playlists are displayed on screen and are assigned to devices via schedules.
  - `id` string, nullable: Template id
  - `name` string, nullable: Template name
  - `group_name` string, nullable: Group name
  - `group_id` string, nullable: Group id
  - `tags` string, nullable: Tags
  - `created_on` string, date-time, nullable: Created on date
  - `created_by_id` string, nullable: Created by user id
  - `modified_on` string, date-time, nullable: Modified on date
  - `modified_by_id` string, nullable: Modified by user id
  - `script` string, nullable: Template script
  - `back_color` string, nullable: Template background color
  - `width` integer, nullable: Width
  - `height` integer, nullable: Height
  - `orientation` integer, nullable: Display orientation in degrees of rotation: 0=Landscape, 90=Portrait, 180=Landscape Reversed, 270=Portrait Reversed
  - `modules` Module[], nullable: Collection of modules/zones that define content areas within this template. Each module/zone represents a rectangular region where content from a playlist is displayed. The terms "module" and "zone" are used interchangeably.
    - `id` string, nullable: Module/zone unique identifier
    - `name` string, nullable: Module/zone name
    - `type` string, nullable: Module/zone type (e.g., 'Playlist', 'Clock', 'Weather', 'Ticker', 'Web')
    - `left` integer, nullable: Left position in pixels from the top-left corner of the template
    - `top` integer, nullable: Top position in pixels from the top-left corner of the template
    - `width` integer, nullable: Width of the module/zone in pixels
    - `height` integer, nullable: Height of the module/zone in pixels
    - `playlist_id` string, nullable: Playlist ID assigned to this module/zone. Determines what content is displayed in this area of the screen.
    - `sequence` integer, nullable: Sequence or Z-order for overlapping modules/zones. Higher values appear in front of lower values.
    - `options` ModuleOption[], nullable: Module/zone configuration options (key-value pairs). Used to store type-specific settings like timezone for Clock zones, location for Weather zones, etc.
      - `id` string, nullable: Module/zone option unique identifier
      - `name` string, nullable: Option name/key (e.g., 'timezone', 'location', 'refresh_interval')
      - `value` string, nullable: Option value (stored as string, parse as needed for the specific option)

## Other responses

- `400`: Bad Request
- `404`: Not Found

---

[API](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api.md) - [All operations](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/revisions/39d5c8302822?raw)
