API docs

crew — the team ledger

mount /crew · base https://zpe.vc/crew · v2.0.0 · 6 operations · 6 write · 1 need no account · beta

archived: committed 2026-11-02, from f05ce06e. Contract: https://zpe.vc/crew/_/api/v1/openapi.json

POST /_/api/v1/pacts/{id}/accept Send the person who accepted to the contract layer's page for this pact. postPactsByIdAccept no account

Send the person who accepted to the contract layer's page for this pact.

Parameters

nameinrequiredtypenotes
idpathyesstringthe pact to accept, as `pact.id` spells it

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
303The contract layer's page for the same pact id. The signature is the service's to record — its version, its evidence and its tier — so this route writes nothing and answers the address a person signs at.object
400The request could not be readobject
401The credential is missing or does not open this accountobject
403This account may not do thatobject
404Nothing is hereobject
429Too many requestsobject

Example

Send the person who accepted to the contract layer's page for this pact..

POST /_/api/v1/pacts/{id}/accept
curl -X POST 'https://zpe.vc/crew/_/api/v1/pacts/string/accept'
303 application/json
{}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/clients Store a client the agency pull found, or update the one already here. postClients

Store a client the agency pull found, or update the one already here.

Parameters

No parameters.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200A client the ledger already held: its name, contract reference, milestone and `synced_at` are rewritten, and `created_at` stays the minute the first sighting wrote. `conversationId` is written only when the body names it (null detaches); absent leaves the attached conversation alone.object
201A client this ledger did not hold. The agency's own id is the key, so the row a second pull sends lands on this one rather than beside it.object
400The body names no id, no name, or no contract reference — the three `clients.store()` refuses rather than fills in.object
401No key. The ingest is a machine call on the ledger's account; a browser session names a person, and a person is not a client's pull.object
403The key's account does not hold this ledger's owner seat. The agency clause licenses this material to the account that authenticated, and a key that could write into another account is the redistribution D11 refuses.object
404Nothing is hereobject
429Too many requestsobject

Example

Store a client the agency pull found, or update the one already here., with a token from the door.

POST /_/api/v1/clients
curl -X POST 'https://zpe.vc/crew/_/api/v1/clients' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "client": {}
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/rooms Pour one pull's rooms: the client's half into chat, his own into the ledger. A re-post writes nothing. postRooms

Pour one pull's rooms: the client's half into chat, his own into the ledger. A re-post writes nothing.

Parameters

No parameters.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200Every room the body named, with the conversation each one is about and the count written and skipped per half.object
400The body is not one object with a `rooms` array, or a room or a line failed its own check: the refusal names the part (`room`, `ref`, `side`, `body`, `at`, `duplicate`).object
401No key. The pull is a machine call, and a browser session names a person.object
403The key's account does not hold this ledger's owner seat, so the rooms of another ledger are not its to write.object
404Nothing is hereobject
429Too many requestsobject
502Chat refused one room's client half (no key, a refused grant, too long, or no answer). The owner's half still landed, and the body carries every room's counts so a retry costs nothing.object

Example

Pour one pull's rooms: the client's half into chat, his own into the ledger. A re-post writes nothing., with a token from the door.

POST /_/api/v1/rooms
curl -X POST 'https://zpe.vc/crew/_/api/v1/rooms' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "rooms": [
    {}
  ]
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/clients/{id}/messages Remember what a client said, with the day its words stop being served. postClientsByIdMessages

Remember what a client said, with the day its words stop being served.

Parameters

nameinrequiredtypenotes
idpathyesstringthe client the words are about, as `client.id` spells it
Idempotency-KeyheadernostringThe post's own retry handle. The unique index on (account_id, idempotency_key) is what makes a second post free: a repeat answers 200 with the first call's row and writes nothing. Absent, every post appends, which is the behaviour a caller with no key had before the column existed.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200That `Idempotency-Key` was already here: nothing was written, and the row is the one the first call answered with — a repeat key whose words moved is still not a second line.object
201The body as it was written: the minute it was said, and the minute its words stop being served.object
400No client in this ledger holds that id, the body has no words, the day it names is outside `(the minute it was said, thirty days after it]`, or a body with no day of its own names no open item (`item`, `unknown-item`, `closed`) — each one the module's own refusal word.object
401No key. A body is written for the ledger's account, and a cookie names a person.object
403The key's account does not hold this ledger's owner seat, so there is no client list here for the words to hang on.object
404Nothing is hereobject
409The item the words name was confirmed by the other side, so there is no open delivery for them to live on.object
429Too many requestsobject

Example

Remember what a client said, with the day its words stop being served., with a token from the door.

POST /_/api/v1/clients/{id}/messages
curl -X POST 'https://zpe.vc/crew/_/api/v1/clients/string/messages' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "message": {}
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/events Push one line of the local ledger's history, under the key that makes a second push free. postEvents

Push one line of the local ledger's history, under the key that makes a second push free.

Parameters

nameinrequiredtypenotes
Idempotency-KeyheadernostringThe push's own key, and the same fact as the body's `idempotencyKey`. The header wins when both are present. The unique index on (account_id, idempotency_key) is what makes the second push free.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200That key was already here: nothing was written, and the row keeps the fields the first push sent — a repeat key whose fields moved is still not a second line of history.object
201A line this ledger did not hold. The caller's `idempotencyKey` is the local row's own uid, so a second push of the same row lands here rather than beside it.object
400A body this ingest refuses: no `idempotencyKey`, no kind, no subject, no artifact, an `at` that is not whole epoch milliseconds, a minute before 1970, or one more than five minutes ahead of this app's clock.object
401No key. The push is a machine call on the ledger's account, and a cookie names a person rather than a collector.object
403The key's account does not hold this ledger's owner seat, so there is no history here for the push to write into.object
404Nothing is hereobject
429Too many requestsobject

Example

Push one line of the local ledger's history, under the key that makes a second push free., with a token from the door.

POST /_/api/v1/events
curl -X POST 'https://zpe.vc/crew/_/api/v1/events' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "event": {}
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/upwork Replace one ledger's Upwork snapshot with the document the mini read. `?account=` names the ledger; absent, the key's own. A ledger the key does not own needs the door's `can_write` for that ledger's channel, granted by its owner. postUpwork

Replace one ledger's Upwork snapshot with the document the mini read. `?account=` names the ledger; absent, the key's own. A ledger the key does not own needs the door's `can_write` for that ledger's channel, granted by its owner.

Parameters

nameinrequiredtypenotes
accountquerynostringThe ledger the snapshot is written into, when it is not the key's own account. The door is asked for `can_write` on `crew-channel:<account>`; nothing is granted by this parameter.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The ledger held a snapshot and this replaced it. `updated_at` is this post's minute — a re-push moves the page's stamp and nothing else — and nothing appends.object
201The ledger held no snapshot and now holds this one: the body as the mini sent it, and the minute crew received it.object
400The body is not one JSON object, or it carries no `proposals` array: the envelope is the one thing this route judges, and the content is the producer's.object
401No key. The mirror is written by the machine on his desk, and a cookie names a person.object
403The key's account does not hold this ledger's owner seat, and the ledger's owner has not granted it `can_write` on this ledger's channel. The door's `why` is in the sentence; nothing was written.object
404Nothing is hereobject
413The body is over 256 KB. A proposal list past that is not the channel.object
429Too many requestsobject
503The ledger named by `?account=` could not be checked at the door (no `DOOR_INTERNAL_TOKEN`, or the door did not answer). Nothing was written.object

Example

Replace one ledger's Upwork snapshot with the document the mini read. `?account=` names the ledger; absent, the key's own. A ledger the key does not own needs the door's `can_write` for that ledger's channel, granted by its owner., with a token from the door.

POST /_/api/v1/upwork
curl -X POST 'https://zpe.vc/crew/_/api/v1/upwork?account=string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "channel": {}
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.