API index

Diesel2 prototype (proto1). This page lists every API route; how to use the pages is in Help.

Checking…

Service

Topics (markdown sources; HTML twin: the wiki at /topics)

Drafts (per user; HTML twin /drafts)

Pipeline (members and their AI tokens; HTML twin /pipeline)

History (append-only; the project's decisions, changes, agents' work and items' lives)

Payments (your plan; HTML twin /account/plan)

Vault (your secrets for your AI agents; HTML twin /vault)

Agents (members and their AI tokens; HTML twin /agents)

Agent tokens (a role token mints one agent token per run)

Crons (members and their AI tokens; HTML twin /crons)

MCP (an AI token as Bearer)

Trash (members; HTML twin /trash)

Thoughts (your own, private; HTML twin /thoughts)

Comments (members; a topic's side panel)

Runs (your own; a story's steps and the step bar)

Story runs (d2 walks a Story in its own browser)

Chats (your own, private; live with a background agent)

Files (HTML twin /cdn; the bytes are served from the file host)

Language

Domain

Objects

Accounts and projects

Broadcast notices (the Architect tells every user something; base d2 only)

  • POST /api/v2/broadcasts support{title (≤80), body (markdown subset ≤2000: paragraphs, **bold**, *italic*, links to https:// or a path), level?: info|warning, until?}: a draft → 201 {id, preview}; nobody is told yet
  • GET /api/v2/broadcasts support E_NOT_FOUND E_STATUSevery broadcast, newest first; /<id> one; PATCH /<id> changes a draft (E_STATUS once sent); DELETE /<id> drops a draft
  • PATCH /api/v2/broadcasts/<id> {…} support E_NOT_FOUND E_STATUS{title?, body?, level?, until?}: changes a draft → {id, preview}; E_STATUS once sent
  • DELETE /api/v2/broadcasts/<id> support E_NOT_FOUND E_STATUSdrops a draft → {deleted}; E_STATUS once sent
  • POST /api/v2/broadcasts/<id>/send support E_NOT_FOUND E_STATUSone priority N_BROADCAST per account, behind notice.broadcast (his AI: asks); /withdraw takes it off everyone's Notices

Try it

curl -s https://dieselwebos.com/api/v2/diesel/run \\
  -H 'content-type: application/json' -H 'authorization: Bearer $D2_TOKEN' \\
  -d '{"spec":"$when hello (who) => (payload = \\"hi \\" + who)","story":"$send hello (who = \\"d2\\")\\n$expect payload == \\"hi d2\\""}'

Reads and diesel/expr are open; other writes (PUT, POST, DELETE) need a bearer token. Log in, sign up, members, tokens and the account pages are HTML forms (the pages; see Help). Admin API (/admin/*: status, logs, deploy, restart, rollback) is separate and token-only.