# editor.markers.add

Source: https://docs.lightair.app/developers/remote-api/editor.markers.add

> Adds a marker at a moment, unless one is there already.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Editor. Script plugins need the `project.write` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `at_ms` | `number` | no | A moment on the canvas's timeline. Default: the playhead. |
| `name` | `string` | no | Its name. |
| `colour` | `string` | no | "#RRGGBB". |
| `len_ms` | `number` | no | Its length. Default 0. |
| `canvas` | `string` | no | A canvas's id or name, shown first. Default: the canvas shown. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `markers` | `object[]` | no | The canvas's markers. |

## Errors

A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it.

## Events

- `editor.changed`

## From an AI agent

The MCP server's `editor_markers (action: add)` reaches this method.

## Related

- [editor.markers.list](https://docs.lightair.app/developers/remote-api/editor.markers.list.md)
