---
title: "Connect a printer to Spoolman, or reconnect it with a new secret."
method: POST
path: "/api/Printers/{printerId}/spoolman-connection"
tags: ["SpoolmanConnections"]
---

# Connect a printer to Spoolman, or reconnect it with a new secret.

`POST /api/Printers/{printerId}/spoolman-connection`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Printers/{printerId}/spoolman-connection`
- Auth: OAuth 2 (authorization code, authorization URL `https://3dprintlog.auth0.com/authorize`, token URL `https://3dprintlog.auth0.com/oauth/token`)

Returns the secret and a ready-to-paste block once; neither can be shown again. The block
holds `[spoolman]` and, unless the printer has a printlog-bridge connection, a
`[notifier 3d_print_log]` that logs its prints. Reconnecting a printer revokes its previous secret. The Free plan includes one
connected printer; connecting a second returns 403 with
`code: "spoolman_connection_limit"` and the `limit`.

## Path parameters

- `printerId` integer, required

## Response `201`

The new connection, with its secret.

- PrintLogApiModelsDTOsSpoolmanSpoolmanConnectionCreatedDto: A newly made connection: the only response that ever carries the secret. It cannot be shown again, so a lost secret means reconnecting, which rotates it.
  - `id` string, uuid
  - `printerId` integer, nullable: The printer it is for, or null once that printer was deleted.
  - `printerName` string, nullable: The printer's current name, or null once that printer was deleted.
  - `name` string, nullable: The printer's name when the connection was made.
  - `createdDate` string, date-time
  - `lastSeenAt` string, date-time, nullable: When the printer last connected with it, or null if it never has.
  - `state` string, nullable: `active`, `disabled` (paused, see PrintLogApi.Models.DTOs.Spoolman.SpoolmanConnectionDto.DisabledReason) or `revoked`.
  - `disabledReason` string, nullable: Why a disabled connection is paused: `tier` when Free allows only one.
  - `disabledAt` string, date-time, nullable
  - `revokedAt` string, date-time, nullable
  - `secret` string, nullable: The secret, URL-userinfo safe (base64url). Shown once.
  - `serverUrl` string, nullable: The `server` value for `moonraker.conf`, secret included.
  - `configBlock` string, nullable: The text to paste at the bottom of `moonraker.conf`: the `[spoolman]` section, followed by a `[notifier 3d_print_log]` section that logs prints unless the printer has a printlog-bridge connection (the bridge logs them itself).

## Other responses

- `401`: Unauthorized
- `403`: The Free plan's connection is used by another printer.
- `404`: The printer is not yours.

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
