---
title: "Update daemon"
method: PUT
path: "/api/v1/daemons/{id}"
tags: ["Daemons"]
---

# Update daemon

`PUT /api/v1/daemons/{id}`

Edits the server-side daemon record: its name, maintainer, tags, and — for ServerPoll —
the url the server dials. Identity and server-managed fields (network, mode, host, key
binding, version, liveness) are restored from the existing record by
`preserve_immutable_fields`.

## Path parameters

- `id` string, uuid, required

## Request body

- Daemon
  - `api_key_id` string, uuid, nullable — Foreign key to API key used for ServerPoll authentication. NULL for DaemonPoll daemons or those not yet linked to a key.
  - `host_id` string, uuid, required — The host this entity belongs to.
  - `is_unreachable` boolean — Whether the daemon is unreachable (for ServerPoll circuit breaker). Set to true after repeated polling failures, reset via retry-connection endpoint.
  - `last_seen` string, date-time, nullable — Timestamp of last successful contact with daemon. NULL for provisioned ServerPoll daemons that haven't been contacted yet.
  - `mode` 'server_poll' | 'daemon_poll', required — Daemon operating mode that determines the communication pattern. - **DaemonPoll** (formerly "Pull"): Daemon makes outbound connections to the server. The daemon registers itself and polls for work. Best for daemons behind NAT/firewall. - **ServerPoll** (formerly "Push"): Server makes connections to the daemon. Server polls daemon for status and discovery results. Best for DMZ deployments where daemon cannot make outbound connections.
  - `name` string, required — Human-facing name for this daemon.
  - `network_id` string, uuid, required — The network this entity belongs to.
  - `standby` boolean — Whether the daemon is on standby due to inactivity (no discovery in 30 days).
  - `standby_cleared_at` string, date-time, nullable — Timestamp of the most recent standby → active transition. Set by `process_startup` when a restarted daemon is un-standby'd, and by the discovery auto-wake path. The nightly inactivity check skips daemons within the grace window (see `STANDBY_GRACE_PERIOD_DAYS`) to prevent the "restart → cleared → re-standby'd before discovery runs" race.
  - `tags` string[], required — Tags assigned to this entity.
  - `url` string, uri, required — Address the *server* dials for a ServerPoll daemon. Editable (a daemon can move); unused and not editable for DaemonPoll, which dials out instead. Base URL the server reaches this daemon on.
  - `user_id` string, uuid, required — User responsible for maintaining this daemon
  - `version` string, nullable — Daemon software version (semver format)
  - `created_at` string, date-time, required — When this record was first created.
  - `id` string, uuid, required — Server-assigned unique identifier.
  - `updated_at` string, date-time, required — When this record was last modified.

## Response `200`

daemon updated

- ApiResponseDaemon
  - `data` object — The result payload. Omitted on failure.
    - `api_key_id` string, uuid, nullable — Foreign key to API key used for ServerPoll authentication. NULL for DaemonPoll daemons or those not yet linked to a key.
    - `host_id` string, uuid, required — The host this entity belongs to.
    - `is_unreachable` boolean — Whether the daemon is unreachable (for ServerPoll circuit breaker). Set to true after repeated polling failures, reset via retry-connection endpoint.
    - `last_seen` string, date-time, nullable — Timestamp of last successful contact with daemon. NULL for provisioned ServerPoll daemons that haven't been contacted yet.
    - `mode` 'server_poll' | 'daemon_poll', required — Daemon operating mode that determines the communication pattern. - **DaemonPoll** (formerly "Pull"): Daemon makes outbound connections to the server. The daemon registers itself and polls for work. Best for daemons behind NAT/firewall. - **ServerPoll** (formerly "Push"): Server makes connections to the daemon. Server polls daemon for status and discovery results. Best for DMZ deployments where daemon cannot make outbound connections.
    - `name` string, required — Human-facing name for this daemon.
    - `network_id` string, uuid, required — The network this entity belongs to.
    - `standby` boolean — Whether the daemon is on standby due to inactivity (no discovery in 30 days).
    - `standby_cleared_at` string, date-time, nullable — Timestamp of the most recent standby → active transition. Set by `process_startup` when a restarted daemon is un-standby'd, and by the discovery auto-wake path. The nightly inactivity check skips daemons within the grace window (see `STANDBY_GRACE_PERIOD_DAYS`) to prevent the "restart → cleared → re-standby'd before discovery runs" race.
    - `tags` string[], required — Tags assigned to this entity.
    - `url` string, uri, required — Address the *server* dials for a ServerPoll daemon. Editable (a daemon can move); unused and not editable for DaemonPoll, which dials out instead. Base URL the server reaches this daemon on.
    - `user_id` string, uuid, required — User responsible for maintaining this daemon
    - `version` string, nullable — Daemon software version (semver format)
    - `created_at` string, date-time, required — When this record was first created.
    - `id` string, uuid, required — Server-assigned unique identifier.
    - `updated_at` string, date-time, required — When this record was last modified.
  - `error` string, nullable — Human-readable failure message. Omitted on success.
  - `meta` ApiMeta, required — API metadata included in all responses
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required — `true` when the request succeeded. `false` responses carry `error` instead of `data`.

## Other responses

- `400` — Invalid request
- `404` — daemon not found

---

[API](https://skmtc.net/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.net/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/versions/28e466341947/schema)
