Skip to content

World

See The World module for every field. Changing the World needs the admin role.

{
"world": {
"company": { "name": "Acme Realty", "domain": "acme-realty.test", "tz": "America/Chicago", "mailboxes": [ … ] },
"streams": [
{ "id": "s_9a8b7c6d5e", "name": "Website leads", "kind": "lead", "to": ["[email protected]"],
"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"]
}

Replaces the company and all streams, and reschedules every enabled stream from now. Send {"company": {…}, "streams": […]}; answers with {"world": {…}}.

  • Leave a new stream’s id out and simmail sets one. Keep the id of an existing stream to keep its sent count.
  • per_day is capped at 500 and new_people at 1.
Error (400)Why
unknown stream kind "…"kind is not one of the kinds above.
stream "…" needs a rate and at least one mailboxAn enabled stream has per_day 0 or no to.
the plan allows 1 inbound stream(s); upgrade for moreMore streams are enabled than your plan allows.

Sends one email from the stream now. Its schedule is unchanged.

{ "status": "sent", "note": "sent initiate to [email protected] (ai)" }

400 “that stream no longer exists” for an unknown id, or your plan’s daily inbound limit.

JavaScript
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, now
Python
from 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"],
{"name": "Support", "kind": StreamKind.SUPPORT, "to": ["[email protected]"], "per_day": 10,
"business_hours": True, "enabled": True}],
})
mail.world.send_now(world["streams"][0]["id"])

StreamKind names each of the kinds above.