# Write

> Tag 3: the client names a write by an id and a destination path; the server opens a write-bytes channel for the content, streams it into the proxy’s /filesystem/write, and answers exactly once, written or an error.

Canonical: https://provider.diverge.network/2.3.0/endpoints/containers-tools-connect/client/write/
Specification revision: 2.3.0

The client opens this channel to write one file into the container.
The channel carries the destination and an id; the content travels
on a channel the server opens.

- **The request.** The tag byte `3` followed by the write id and the
  path as JSON. [Request](/2.3.0/endpoints/containers-tools-connect/client/write/request/) states its
  form.
- **The content.** The server opens a [write-bytes](/2.3.0/endpoints/containers-tools-connect/server/write-bytes/) channel
  quoting the write id, and streams what arrives on it into the
  proxy's [`/filesystem/write`](/2.3.0/proxy/filesystem/write/) for the
  path.
- **The response.** Exactly one channel response, written or an
  error, and the channel response finish.
  [Response](/2.3.0/endpoints/containers-tools-connect/client/write/response/) states the sequence.
- **Content that stops.** Content that ends without a finish, on
  either side, is a write that did not happen: the server answers
  with an error, and the destination is as it was.
