Skip to content

Publishing

All of these need a wallet session. A publisher can only see and change their own presses.

Save a draft

POST /api/press/save
json
{
  "id": 12,
  "generationId": 4,
  "headline": "8 to 90 characters",
  "stock": "TSLA",
  "priceUsdg": 0.5,
  "publisherName": "Your byline",
  "preview": "80 to 400 characters",
  "body": "At least 150 words"
}

Leave out id to create a new draft. Include it to update one. generationId is optional and links the press to an AI draft.

Returns { "id": 12 }.

  • Any edit resets the press to draft, so it has to be audited again.
  • A live press can't be edited (409).
  • At most 20 new drafts per wallet per day (429).

Run the audit

POST /api/press/audit
{ "id": 12 }
json
{
  "status": "approved",
  "audit": {
    "verdict": "approve",
    "score": 90,
    "summary": "…",
    "issues": [{ "severity": "note", "check": "numbers", "detail": "…" }],
    "facts": { "quote": { "…": "…" }, "publisherHolds": false, "publisherBalance": "0" },
    "engine": "…",
    "auditedAt": "…"
  },
  "metaUrl": "https://capitalpress.io/api/meta/12"
}

status is approved, revise or rejected. At most eight audits per press (429). Returns 503 if the audit agent is unavailable; the draft stays saved.

Mint

Minting is done by the publisher's own wallet, not by the API. Call the identity registry:

register(metaUrl)   on 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432

using the metaUrl from the audit response.

Confirm the mint

POST /api/press/minted
{ "id": 12, "txHash": "0x…" }
json
{ "slug": "the-headline-12", "pressId": 322 }

The server checks that the transaction succeeded, was sent by the signed-in wallet, minted an identity to that wallet, and that the identity points to this press's metaUrl. Only then does the press go live. Calling it again for a live press returns the same result.

Draft with AI

POST /api/draft/angles
{ "stock": "NVDA" }
json
{
  "angles": [
    { "id": "h0", "kind": "headline", "title": "…", "detail": "…", "source": "example.com", "link": "https://…", "publishedAt": "…" },
    { "id": "price", "kind": "price", "title": "Today's NVDA token price action", "detail": "…" },
    { "id": "fundamentals", "kind": "fundamentals", "title": "…", "detail": "…" }
  ],
  "freshNews": true,
  "remaining": 5
}
POST /api/draft/generate
{ "stock": "NVDA", "angleId": "h0" }
json
{
  "generationId": 4,
  "draft": { "headline": "…", "preview": "…", "body": "…" },
  "sources": [{ "title": "…", "source": "example.com", "link": "https://…" }],
  "remaining": 4
}

Five generations per wallet per day (429). Pass generationId to /press/save so the press is labelled AI-assisted and its source facts reach the audit.

Your presses

GET /api/me/dashboard
json
{
  "presses": [{ "…press fields…", "status": "live", "earnedUsdg": 2.25, "updatedAt": "…" }],
  "totals": { "earnedUsdg": 2.25, "live": 1, "reads": 5 }
}

status is one of draft, revise, rejected, approved, live.

GET /api/me/press/{id}

One of your presses with its full text, latest audit report and metaUrl.

Nothing published on Capital Press is investment advice.