Matches in other apps
crew — the team ledger
mount /crew · base https://zpe.vc/crew · v3.0.0 · 7 operations · 7 write · 1 need no account · beta
the document this app serves now. Contract: https://zpe.vc/crew/_/api/v1/openapi.json · sha256 e8b729990a6a
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
| name | in | required | type | notes |
|---|---|---|---|---|
id | path | yes | string | the pact to accept, as `pact.id` spells it |
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
303 | The 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. | |
400 | The request could not be read | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that | object |
404 | Nothing is here | object |
429 | Too many requests | object |
Example
Send the person who accepted to the contract layer's page for this pact..
curl -X POST 'https://zpe.vc/crew/_/api/v1/pacts/string/accept'
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
| status | meaning | body |
|---|---|---|
200 | A 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 |
201 | A 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 |
400 | The body names no id, no name, or no contract reference — the three `clients.store()` refuses rather than fills in. | object |
401 | No 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 |
403 | The 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 |
404 | Nothing is here | object |
429 | Too many requests | object |
Example
Store a client the agency pull found, or update the one already here., with a token from the door.
curl -X POST 'https://zpe.vc/crew/_/api/v1/clients' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{
"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
| status | meaning | body |
|---|---|---|
200 | Every room the body named, with the conversation each one is about and the count written and skipped per half. | object |
400 | The 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 |
401 | No key. The pull is a machine call, and a browser session names a person. | object |
403 | The key's account does not hold this ledger's owner seat, so the rooms of another ledger are not its to write. | object |
404 | Nothing is here | object |
429 | Too many requests | object |
502 | Chat 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.
curl -X POST 'https://zpe.vc/crew/_/api/v1/rooms' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{
"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
| name | in | required | type | notes |
|---|---|---|---|---|
id | path | yes | string | the client the words are about, as `client.id` spells it |
Idempotency-Key | header | no | string | The 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
| status | meaning | body |
|---|---|---|
200 | That `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 |
201 | The body as it was written: the minute it was said, and the minute its words stop being served. | object |
400 | No 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 |
401 | No key. A body is written for the ledger's account, and a cookie names a person. | object |
403 | The 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 |
404 | Nothing is here | object |
409 | The item the words name was confirmed by the other side, so there is no open delivery for them to live on. | object |
429 | Too many requests | object |
Example
Remember what a client said, with the day its words stop being served., with a token from the door.
curl -X POST 'https://zpe.vc/crew/_/api/v1/clients/string/messages' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{
"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
| name | in | required | type | notes |
|---|---|---|---|---|
Idempotency-Key | header | no | string | The 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
| status | meaning | body |
|---|---|---|
200 | That 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 |
201 | A 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 |
400 | A 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 |
401 | No key. The push is a machine call on the ledger's account, and a cookie names a person rather than a collector. | object |
403 | The key's account does not hold this ledger's owner seat, so there is no history here for the push to write into. | object |
404 | Nothing is here | object |
429 | Too many requests | object |
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.
curl -X POST 'https://zpe.vc/crew/_/api/v1/events' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{
"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
| name | in | required | type | notes |
|---|---|---|---|---|
account | query | no | string | The 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
| status | meaning | body |
|---|---|---|
200 | The 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 |
201 | The ledger held no snapshot and now holds this one: the body as the mini sent it, and the minute crew received it. | object |
400 | The 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 |
401 | No key. The mirror is written by the machine on his desk, and a cookie names a person. | object |
403 | The 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 |
404 | Nothing is here | object |
413 | The body is over 256 KB. A proposal list past that is not the channel. | object |
429 | Too many requests | object |
503 | The 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.
curl -X POST 'https://zpe.vc/crew/_/api/v1/upwork?account=string' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{
"channel": {}
}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/channel-events
Keep a page of the channel's events in this ledger, keyed by the channel's own id. A re-post of a page writes nothing and says so.
postChannelEvents
Keep a page of the channel's events in this ledger, keyed by the channel's own id. A re-post of a page writes nothing and says so.
Parameters
| name | in | required | type | notes |
|---|---|---|---|---|
account | query | no | string | The ledger the events are kept in, when it is not the key's own. 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
| status | meaning | body |
|---|---|---|
200 | The page was poured. `written` rows are new, `replayed` events were already here (a retry writes nothing), and `cursor` is the highest channel id in the page — the `since` to send next, or null for an empty page. | object |
400 | The body is not one JSON object with an `events` array, or an event in it was refused: `event`, `id`, `kind`, `subject_ref`, `at` or `payload`. Nothing was written, in this ledger or any other. | object |
401 | No key. The mirror is written by the machine on his desk, and a cookie names a person. | object |
403 | The 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. Nothing was written. | object |
404 | Nothing is here | object |
413 | The body carries more than 200 events. That is the channel's own page size, so a larger body is a consumer that joined pages rather than one that read one. | object |
429 | Too many requests | object |
503 | The ledger named by `?account=` could not be checked at the door, or the store refused the write. The sentence names which event could not be written; a retry costs nothing. | object |
Example
Keep a page of the channel's events in this ledger, keyed by the channel's own id. A re-post of a page writes nothing and says so., with a token from the door.
curl -X POST 'https://zpe.vc/crew/_/api/v1/channel-events?account=string' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{
"written": 0,
"replayed": 0,
"cursor": null
}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.