Hatch
On this page

The body is the file’s bytes. base is the hash this device last saw, so a change made elsewhere since is a 409, never lost.

PUT/api/sync/vaults/{vault}/file

Authorization

  • session: Authorization: Bearer <token>. The session token from signing in (or the session cookie in a browser on the same origin).

Path parameters

  • vault string (required)

Query parameters

  • path string (required): The file’s path in the vault. At most 1024 characters
  • base string: At most 64 characters
  • hash string: For encrypted vaults: the hash of the plain file. At most 64 characters

Request body application/octet-stream

string (binary)

Response

200: It worked

  • ok true (required)
  • rev number (required)
  • hash string (required): At most 64 characters

Other answers:

  • 4XX: Refused, with a message to show the person