# `POST /agent/state` Protected. Requires a valid session cookie (`credentials: 'include'`). Post agent state Authorized endpoint for the printer agent to report its operational status/telemetry. ## Body (JSON) | Field | Required | Type | Description | |-------|----------|------|-------------| | `state` | no | | Status text or status object | ```json { "state": "…" } ``` ## Response `200` State recorded ```json { "success": true, "agent": { "id": 1, "companyId": 1, "name": "…", "token": "…", "pairingpin": "…", "pairedAt": "…", "agentversion": "…", "lastseenAt": "…", "updatedAt": "…", "sort": 1, "enabled": true } } ``` ## Errors | Status | Description | |--------|-------------| | 401 | Unauthorized | --- _Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._