---
title: "Create a serial command template"
method: POST
path: "/v1/serial-templates"
tags: ["serial-templates"]
---

# Create a serial command template

`POST /v1/serial-templates`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/serial-templates`
- Auth: HTTP bearer

Create an RS232 command template. Provide a `name`, an optional `model`, an `items` array of commands each with `name`, `value`, `encoding` (`ascii` or `hex`), and `eol`, and an optional `nodeId`.

## Request body

- object
  - `name` string, required
  - `model` string, nullable
  - `nodeId` string, nullable: Home location; null = workspace root.
  - `items` object[]: The commands, at most 200. On update the list replaces the stored one.
    - `id` string: Keep an existing command's id; omit to get a new one.
    - `name` string, required
    - `value` string, required: At most 512 characters, and it must give at least one byte.
    - `encoding` 'ascii' | 'hex': Default `ascii`. An unknown value is read as `ascii`.
    - `eol` 'none' | 'cr' | 'lf' | 'crlf': Default `none`. An unknown value is read as `none`.

## Response `201`

Success.

- object
  - `data` SerialTemplate, required: A saved set of RS232 commands for one panel model.
    - `id` string, required: Serial template id.
    - `spaceId` string, required
    - `name` string, required
    - `model` string, nullable, required: Free-text panel model (`Sony Bravia FW-series`).
    - `nodeId` string, nullable, required: Home location; null = workspace root.
    - `createdAt` string, required: ISO-8601 timestamp (UTC).
    - `updatedAt` string, required: ISO-8601 timestamp (UTC).
    - `items` object[], required
      - `id` string, required: Command id. Kept across edits, so saved buttons that name it keep working.
      - `name` string, required
      - `value` string, required: The command: literal text (`ascii`) or hex digits (`hex`).
      - `encoding` 'ascii' | 'hex', required
      - `eol` 'none' | 'cr' | 'lf' | 'crlf', required: Line ending added after the value.
      - `hexPreview` string, required: The exact bytes sent, as spaced hex (`2A 53 0A`).

## Other responses

- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `422`: `name` is missing, `invalid_node` (the location is not in this workspace), or a command is not valid (no name, no value, too long, no bytes, a duplicate id, over 200 commands); `message` names it.
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
