Folders

Report a folder status

Reports your sign-in's status for one folder copy and returns the latest accepted sequence and receipt time. An equal or older sequence changes nothing. A sign-in keeps at most 16 copies of a folder; a new copy past that replaces its oldest.

PUT
/folders/{id}/status

Authorization

bearerAuth
headerAuthorizationBearer <token>

Authenticate with an API key (marfa_k1_…) or an OAuth access token (marfa_at_…).

Path parameters

id*string

The ID of the folder.

Header parameters

X-Marfa-Instance-Id?string

The ID of the instance you expect, as GET / returns it. If another instance answers at this address, Marfa returns 409 instance_changed and doesn't write. Leave it out to send the request to whichever instance answers.

Match^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Request body

application/json
  1. body

A folder copy's last observed sync health, containing no file details.

folder_store_id*string

The opaque ID of this local folder copy; it reveals no path or machine name.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128
sequence*integer

The increasing sequence for this copy under this sign-in; a retry keeps its sequence.

Range1 <= value <= 9007199254740991
last_success_at*|

When this copy last finished a fully successful sync, as reported by the client, in UTC; null if none has completed.

Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
pending_uploads*integer

The distinct local files last observed waiting to upload.

Range0 <= value <= 9007199254740991
pending_downloads*integer

The distinct items whose files the last completed pull could not write; retained when a later pull fails.

Range0 <= value <= 9007199254740991
paused_removals*integer

The file removals waiting for confirmation on this copy.

Range0 <= value <= 9007199254740991
first_sync_waiting*boolean

true if this copy's first sync is waiting for confirmation.

problems*array<>

The current problem counts, each code once; an empty list means none were observed.

Itemsitems <= 10

Response body

About errors

Returns the latest accepted sequence and receipt time for your copy.

application/json
  1. response

The latest accepted report's sequence and receipt time.

accepted*boolean

true if this report replaced the stored report; false for an equal or older sequence.

sequence*integer

The latest stored sequence for this copy and sign-in; a behind client resnapshots and sends a higher sequence.

Range1 <= value <= 9007199254740991
received_at*string

When the latest report was first accepted, in UTC; retries do not refresh it.

Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
  • invalid_id: the folder ID is malformed.
  • validation_error: a field, count, time, code, or undeclared field is invalid.
  • missing_required_field: a required report field is missing.
application/json
  1. response

An error response.

error*

What went wrong.

unauthorized: the request has no credential, or its credential is not valid. For a key that has expired, details.expired_at says when it expired.

application/json
  1. response

An error response.

error*

What went wrong.

  • type_not_permitted: your credential reads no type.
  • forbidden: a local command has no sign-in to report under.
application/json
  1. response

An error response.

error*

What went wrong.

  • item_not_found: the folder does not exist or you cannot read it.
application/json
  1. response

An error response.

error*

What went wrong.

request_timeout: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests.

application/json
  1. response

An error response.

error*

What went wrong.

instance_changed: X-Marfa-Instance-Id names another instance. Nothing is written. Rebuild the working copy from the instance at this address.

application/json
  1. response

An error response.

error*

What went wrong.

contract_mismatch: X-Marfa-Contract names another contract version than this instance speaks, or is not a whole number. Nothing was done.

application/json
  1. response

An error response.

error*

What went wrong.

request_too_large: the request body is larger than this instance accepts.

application/json
  1. response

An error response.

error*

What went wrong.

rate_limited: you sent too many requests. Wait for the number of seconds in Retry-After, then try again.

application/json
  1. response

An error response.

error*

What went wrong.

internal_error: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write.

application/json
  1. response

An error response.

error*

What went wrong.

write_contention: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, details.reason is restore_running.

application/json
  1. response

An error response.

error*

What went wrong.

insufficient_storage: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless details.write_outcome is unknown, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again.

application/json
  1. response

An error response.

error*

What went wrong.

curl -X PUT 'http://localhost:8600/folders/string/status' \  -H 'Content-Type: application/json' \  -d '{  "folder_store_id": "string",  "sequence": 1,  "last_success_at": "string",  "pending_uploads": 0,  "pending_downloads": 0,  "paused_removals": 0,  "first_sync_waiting": true,  "problems": [    {      "code": "conflict",      "count": 0    }  ]}'
About errors
{  "accepted": true,  "sequence": 1,  "received_at": "2026-10-03T09:30:00.000Z"}