Printago API
POST /v1/macros/{id}/run

Run GCODE macro on printers

Sends the macro's GCODE to the given printers. Each printer must be online, idle, compatible with the macro's declared printer models, and on an adapter that supports raw GCODE; printers failing any of these checks are reported per-printer rather than failing the whole request. `expectedUpdatedAt` is required; if the macro has been edited since it was previewed, the run is rejected with 409 so a stale preview is never executed.

Requires: macro.run

Path Parameters

id required
string
Macro ID

Request Body

Target printer IDs and the previewed macro's `updatedAt`

RunGcodeMacroRequest
expectedUpdatedAtrequired
string
`updatedAt` of the macro the caller previewed. Required: the run is rejected with 409 if the macro has changed since, so a stale preview is never executed.
format: date-time
printerIdsrequired
string[]
Target printers. Duplicates are collapsed server-side.
min items: 1max items: 500

Example Request

application/json
{
  "printerIds": [
    "string"
  ],
  "expectedUpdatedAt": "2026-08-24T03:58:55.505Z"
}

Response Schema

Response
value
object[]

Example Response

201 OK — application/json
[
  {
    "printerId": "string",
    "sent": true
  }
]