Skip to main content

REST reference

Base URL: https://verelyn.com/api/external/v1. Send the bearer token obtained by browser OAuth. Never paste it into documentation, a support message, or a chat. These routes are deployed contracts; authorized live use is access dependent. POST /catchups, POST /catchups/{id}/deliveries, POST /catchup-schedules, PATCH /catchup-schedules/{id}, and DELETE /catchup-schedules/{id} need an Idempotency-Key header; a missing or empty header returns idempotency_key_required. POST /catchups/{id}/acknowledgements does not, since its one-use acknowledgement_token is already idempotent. Submitting, delivering, or scheduling a catch-up also needs a consent capability beyond the base permission (catchup_prepare, catchup_refresh, catchup_schedule, or catchup_deliver). Both transports call the same service. A key or connection holds a capability only if the reader granted it: The MCP server does not offer catch-ups in this version, and the consent screen and the key form no longer ask for these capabilities.

Exact write bodies

UUID fields are command_id, draft_id, target_answer_id, item_id, alert_id, and a monitor path {id}. question_id is a non-empty string of at most 160 characters; use the value returned by the service unchanged. POST /mandate:
expected_revision is a non-negative integer; statement is 1–2,000 characters; provenance is reader_words or assistant_suggestion. GET /mandate returns the current revision; send it as expected_revision. If the mandate changed since, the call answers 200 with outcome: "refused" and the current revision, and nothing is changed. If that revision differs from the one you sent, read GET /mandate again and retry. resolve is optional: go_by_new or keep_previous. Send it only to answer a pending question whose question_reason is contradiction, with the reader’s own choice and provenance reader_words. It settles the statement that asked, using that statement’s recorded words (send the reader’s reply as statement). go_by_new goes by the new statement; keep_previous changes nothing. If that question is no longer pending (already answered, or a newer statement arrived), the request fails with HTTP 409 no_pending_question. Retrying with the same command_id and payload returns the first result. POST /monitors takes exactly one field, never both:
POST /monitors/{id}:
Monitor state is active, paused, or stopped. GET /updates supplies alert IDs as items[].id; GET /briefing does not expose edition item IDs, so use the web edition for that starting path. POST /onboarding:
POST /onboarding/answers always requires UUID draft_id, UUID command_id, non-negative expected_revision, action, and provenance (reader_answer or assistant_suggestion). action is answer, correct, skip, or retry. answer requires question_id, question_text, and non-empty answer; correct also requires UUID target_answer_id; skip requires the two question fields; retry needs no extra action field. Optional timezone is an IANA time-zone name. An accepted answer can return:
POST /catchups:
mode is newsroom_state or fresh_now; scope is {"kind":"all"} or {"kind":"subset","interest_ids":[...]} with 1–200 UUIDs the reader already follows; delivery is stored or email and defaults to stored. POST /catchups/{id}/acknowledgements:
POST /catchups/{id}/deliveries needs no body. POST /catchup-schedules:
weekday is 1–7 (Monday–Sunday) and local_time is an "HH:MM" string in timezone, up to 500 slots. The first schedule that is not the standing daily 07:00 edition must also send legacy_cadence: preserve keeps that daily edition, replace removes it. PATCH /catchup-schedules/{id} pauses or resumes:
Or replaces the definition with the same fields as POST /catchup-schedules minus legacy_cadence. DELETE /catchup-schedules/{id} needs no body; the standing daily 07:00 edition returns schedule_conflict instead of removing it.

Response envelopes

REST success returns the documented object directly as JSON. A successful mandate correction is shaped like:
When outcome is needs_answer, question is the one question to put to the reader and question_reason says how to answer it: contradiction (answer with resolve), or several_changes, ambiguous_target, unsure_stop, unclear_name (answer with the reader’s reply as a new statement). REST failures use {"error":{"code":"invalid_cursor","message":"That cursor is not one this newsroom issued."}}. An internal_error may also contain correlation_id, which is safe to quote to support. Authorization failures are generic and do not disclose whether another account owns an identifier. POST /catchups accepts with {"disposition":"accepted","operation":{...},"poll":"/api/external/v1/catchups/<id>"}; poll with GET /catchups/{id} using that ID. GET /catchup-schedules returns each schedule as the service stores it, including camelCase fields such as legacy0700, localTime, and nextOccurrence that do not match the snake_case request bodies above. See the MCP reference for the full operation, delivery, and schedule field vocabulary shared by both transports.