World
See The World module for every field. Changing the World needs the admin role.
GET /api/world
Section titled “GET /api/world”{ "world": { "company": { "name": "Acme Realty", "domain": "acme-realty.test", "tz": "America/Chicago", "mailboxes": [ … ] }, "streams": [ "per_day": 6, "business_hours": true, "brief": "asking about homes for sale", "new_people": 0.8, "enabled": true, "sent": 14, "next": "2026-10-10T16:41:07-05:00" } ] }, "kinds": ["lead", "support", "vendor", "partner", "customer", "newsletter", "spam", "phishing", "custom"]}PUT /api/world
Section titled “PUT /api/world”Replaces the company and all streams, and reschedules every enabled stream from now. Send {"company": {…}, "streams": […]}; answers with {"world": {…}}.
- Leave a new stream’s
idout and simmail sets one. Keep theidof an existing stream to keep itssentcount. per_dayis capped at 500 andnew_peopleat 1.
Error (400) | Why |
|---|---|
unknown stream kind "…" | kind is not one of the kinds above. |
stream "…" needs a rate and at least one mailbox | An enabled stream has per_day 0 or no to. |
the plan allows 1 inbound stream(s); upgrade for more | More streams are enabled than your plan allows. |
POST /api/world/streams/{id}/send
Section titled “POST /api/world/streams/{id}/send”Sends one email from the stream now. Its schedule is unchanged.
400 “that stream no longer exists” for an unknown id, or your plan’s daily inbound limit.
With the SDKs
Section titled “With the SDKs”import { Simmail, StreamKind } from "@plexuslabs/simmail";
const mail = new Simmail();const { world } = await mail.world.get();await mail.world.set({ company: { name: "Acme Realty", domain: "acme-realty.test", tz: "America/Chicago" }, streams: [ ...world.streams, { name: "Support", kind: StreamKind.Support, to: ["[email protected]"], per_day: 10, business_hours: true, enabled: true }, ],});await mail.world.sendNow(world.streams[0].id); // one email from that stream, nowfrom simmail import Simmail, StreamKind
mail = Simmail()world = mail.world.get()["world"]mail.world.set({ "company": {"name": "Acme Realty", "domain": "acme-realty.test", "tz": "America/Chicago"}, "streams": [*world["streams"], "business_hours": True, "enabled": True}],})mail.world.send_now(world["streams"][0]["id"])StreamKind names each of the kinds above.