Cases
See Cases for how cases work.
GET /api/cases
Section titled “GET /api/cases”Every case, most recently updated first. Each story is cut to its first 200 characters.
GET /api/cases/{id}
Section titled “GET /api/cases/{id}”One case, with its full story and amendments. ?redact=story leaves both out.
| Field | Meaning |
|---|---|
id, title, kind | |
facts, known | Objects of keys and values. |
people | Each with ref, name, role, org, addresses, notes, persona_id, external_ids, and the cast details who, wants, knows, temperament, character. |
notes | List of notes. |
directions | How you want the story to go. |
story, amendments | What is actually true, and later changes to it. |
story_by | Who wrote it: ai, template or edited. |
created, updated | Simulated time. |
PUT /api/cases/{id}
Section titled “PUT /api/cases/{id}”Creates the case or merges a push into it. PATCH does the same. The first push writes the story and casts everyone with an address as a persona.
{ "title": "Sale of 1701 Clark Street", "facts": { "address": "1701 Clark Street", "asking_price": 175000 }, "known": { "buyer_budget": "about 170k" }, "people": [{ "ref": "seller", "name": "Dana Reyes", "role": "seller", "addresses": ["[email protected]"] }], "notes": ["The roof was replaced in 2021."], "directions": "Dana is reluctant to go below 170k."}The answer leaves the story out:
{ "id": "deal-1701", "title": "Sale of 1701 Clark Street", "people": [{ "ref": "seller", "name": "Dana Reyes", "persona_id": "p_3fa2b1c9d0", "addresses": ["[email protected]"] }], "story_written_by": "ai"}POST /api/cases/{id}/people
Section titled “POST /api/cases/{id}/people”Adds or updates people on the case. The body is a list of people, as in people above. The answer is the same as for PUT.
POST /api/cases/{id}/initiate
Section titled “POST /api/cases/{id}/initiate”Has a person start a new thread.
| Field | Required | Meaning |
|---|---|---|
persona | yes | The persona’s id or address. |
to | yes | Who they write to. |
intent | What they write about. | |
after | Wait this long first, on the simulated clock, such as "2h". |
Answer: {"job_id": 128}. See jobs.
POST /api/cases/{id}/regenerate
Section titled “POST /api/cases/{id}/regenerate”Throws the story and amendments away, and the cast details simmail chose, and writes them again. Answers with the case.
PATCH /api/cases/{id}/story
Section titled “PATCH /api/cases/{id}/story”Rewrites the answer key by hand. Every field is optional:
{ "story": "…", "amendments": ["…"], "directions": "…" }A new story marks it story_by: "edited". Answers with the case.
DELETE /api/cases/{id}
Section titled “DELETE /api/cases/{id}”Deletes the case, its people’s memory of it and their pending work on it. People created for this case alone are deleted too.