Everything the studio does — for a program and for an AI assistant: the user's books, new ones (blank, from the library, from a Word file), the studio assistant's actions on a book, its versions, pictures of its pages, and its PDF at the studio's prices.
Make a key in the studio: account → «חיבורים ומפתחות» (Connections and keys), choose its scopes and copy it (it is shown once). Every request carries it:
Who am I
curl https://api.ariach.com/v1/me \
-H "Authorization: Bearer $ARIACH_KEY"
A new book from a Word file (a job: 202 with the job's address)
curl https://api.ariach.com/v1/books \
-H "Authorization: Bearer $ARIACH_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-F file=@book.docx
Follow the job until it ends
curl https://api.ariach.com/v1/jobs/<job id> \
-H "Authorization: Bearer $ARIACH_KEY"
The book's PDF (not paid for: a sample of its first pages, and where it is paid for in the studio)
curl https://api.ariach.com/v1/books/<book id>/exports \
-H "Authorization: Bearer $ARIACH_KEY" \
-H "Content-Type: application/json" \
-d '{"format":"pdf"}'
The same tools, for an assistant talking with the user. One address; the user approves it in their own account (OAuth). Before each series of changes to a book a version is saved, and a window in the conversation shows the pages and uploads Word files.
Claude (web and apps): Settings → Connectors → Add custom connector, with the address:
https://mcp.ariach.com/mcp
Claude Code:
claude mcp add --transport http ariach https://mcp.ariach.com/mcp
ChatGPT: Settings → Apps & Connectors → Create, with the address above.
Authorization: Bearer <key> — a key from the studio, or an OAuth 2.1 access token (authorization code with PKCE). A request without the scope it needs: 403 insufficient-scope naming it.application/problem+json): type is a page explaining the problem, title in the user's language, and on a field's error errors for each field.Idempotency-Key: the same key again within 24 hours gives the first answer again, and does nothing twice.RateLimit and RateLimit-Policy — what is left; past it, 429 with Retry-After.Location; follow it, or get a webhook at its end.pay_url.books:read | Read the user's books, their versions and pages, and run the read-only actions | |
books:write | Make, rename and trash books, run the actions that change a book, save and restore versions | |
export | Make files of a book: the PDF, a proof copy, the cover, InDesign — as the studio's «ייצוא», at the studio's prices | |
library:read | Search the library (Otzaria) a book is made of | |
webhooks | Manage the account's webhook endpoints |
When a job ends, a POST to each endpoint that asked for the event, by Standard Webhooks 1.0. Verify the signature, and drop a webhook-id seen before. An answer other than 2xx is tried again for a day; 410 stops the endpoint.
job.succeeded | A job ended well; data.job is the job, its result what came of it | |
job.failed | A job failed; data.job.problem says why (a problem body, RFC 9457) | |
book.created | A new book was made (a book.create job succeeded); data.book is the book | |
export.ready | A file of a book is ready (an export job succeeded); data.file is where to download it, for a day |
Verifying the signature (Node):
import { createHmac, timingSafeEqual } from "node:crypto"
function verified(headers, body, secret) {
const id = headers["webhook-id"], ts = headers["webhook-timestamp"]
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64")
const want = createHmac("sha256", key).update(`${id}.${ts}.${body}`).digest("base64")
return headers["webhook-signature"].split(" ").some((s) => {
const [v, sig] = s.split(",")
return v === "v1" && sig.length === want.length && timingSafeEqual(Buffer.from(sig), Buffer.from(want))
})
}
The whole description · https://api.ariach.com
Who the caller is, and their jobs
/v1/me Who the caller isAnswer: 200
/v1/jobs The caller's jobslimit | integer | 1–100 |
before | string | Jobs created before this time (the next link gives it) |
Answer: 200
/v1/jobs/{id} One jobAnswer: 200
The user's books, and new ones
/v1/books The user's books books:readq | string | Words of the title |
shared | string | only: books shared with the user · none: their own alone |
limit | integer | |
page | integer |
Answer: 200
/v1/books A new book books:writeMade as the studio makes a new book: the site's design for a new book; a Word file read by the model as there (part of the week's allowance; ai: false — by the rules alone); the account's limits and book quota as there. A job: follow Location, or a webhook book.created.
NewBook
Answer: 202 · Idempotency-Key
/v1/books/{id} One book books:readAnswer: 200
/v1/books/{id} Rename a book books:writetitle | string |
Answer: 200
/v1/books/{id} Put a book in the trash books:writeThe owner alone. The studio's trash gives it back for 30 days.
Answer: 204
The library a book is made of (Otzaria)
/v1/library Search the library library:readq * | string | Words of the title |
limit | integer |
Answer: 200
/v1/library/commentaries What is linked to a library book library:readbook * | string | The library book's id |
Answer: 200
The actions on a book — the studio assistant's own tools. The body: the action's input (its schema in GET /v1/actions).
/v1/actions The actions there areAnswer: 200
/v1/books/{id}/actions/book_overview book overview books:readThe open book: its title, its texts with the code a search names them by (0 the main text, then each note region), its note regions (index in notes[] and name), its heading levels, its paragraph styles (index, name, their look in a few words — font, size, bold, alignment where the style sets them — and how many paragraphs of the main text are in each; of a style that numbers its paragraphs, automatic_number: in how many the number shows and in how many it is turned off) and character styles (index, name, and a character style's code), whether the open book is a site's sample (open_book) and not the user's, the page count, the pages flagged for review, and whether the settings and the text may be changed here — and headings: each level of the book's headings as the engine laid them out, in a line (how many, how their numbers run — automatic or written in the headings — where they start again, where the run breaks) and the breaks themselves (paragraph, page, the number expected). Call it first when the request names a region, a style or a heading level, or is about the book's headings or their numbers.
Answer: 200
/v1/books/{id}/actions/read_settings read settings books:readThe current settings, flat: {path: value} for every setting on the map, by the same paths change_settings takes; a style or part read by its path has its structures with it (para_styles[3].deco — its frame and lines), and a list read whole names them (read_by_their_paths). paths: only the settings under these (para_styles[3], para_styles[3].first_word, page) — prefer it: all the paragraph styles are thousands of words. sections: whole parts (page, main, notes, headings, column_style, note_sep, furniture, styles, para_styles); neither = all.
paths | array | |
sections | array |
Answer: 200
/v1/books/{id}/actions/list_fonts list fonts books:readThe fonts there are: slot number (what a font setting holds), Hebrew name, and kind (text / ornament); computer true: a font from the user's computer that the book is set in — the book's own, named by its name and set again by its slot like any other. Choose a font by its name here. named_as: the user's words that name that font, spelt their way or with more to its name («פרנקריל» for «פרנקריהל», «הדסה פרידלנדר» for «הדסה») — it is the font they asked for: set it, and say its name as listed here; where two fonts are named so, ask which (ask_user).
Answer: 200
/v1/books/{id}/actions/change_settings change settings books:writeChange settings, all at once, as one step the user can undo. Each change: a path (with indexes: para_styles[0].font, notes[1].numbering.style, furniture.head.items[0].place.dy_mm) and its new value. A value is one setting — of the kind the map gives — or a WHOLE structure as an object (a frame, an ornamented line, a running-head item, a flexibility stage): checked field by field against the engine's schema, fields left out take their defaults, a tagged structure needs its "kind"; null where null has a meaning (no frame, as the main text). A change inside a part that is not set yet (para_styles[0].deco.frame.shape where there is no frame) makes the part from its defaults. Each change is checked — an unknown path or field, a value of the wrong kind or outside its span, a closed setting, settings wrong together — and the engine itself reads the result last; what fails is rejected and said why, the rest applied. Answers what was applied (before → after, in Hebrew), what was rejected, reach (for a change in a paragraph style: how many paragraphs of the main text are in it — all of them changed), the page count before and after, the pages flagged for review — and what the change did to the headings as the engine laid them out: headings_changed (each level that changed, before → after) or headings_unchanged (a change meant for the headings that changed nothing in them). A change of a style's heading level where the text uses the style is shown to the user first as a card, and waits for their approval.
changes | array |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/edit_list edit list books:writeChange one of the settings' lists, as one step the user can undo: "add" an item (value: its fields — those left out take the engine's defaults; a tagged item needs its "kind"; index: where, default at the end), "remove" the item at index, "move" it to place to, or "duplicate" it. list is the list's path: para_styles[i].text.enclosures, notes[0].enclosures, subst.rules, zone.rows, zone.rows[0].slots, furniture.head.items (also furniture.head.even, furniture.foot.items), furniture.head.items[0].what.runs, group_styles, templates, flex.sources (move only), para_styles (remove, duplicate), notes[0].headings, notes[0].styles, templates[0].toc.levels … Guarded as the settings panel guards: a note region or a character style is not added or removed here (their codes are written in the book's text — add_commentary / add_style add one), a part is not added or duplicated here (add_part with part puts its settings and its line in together), a style or a part the text uses is not removed, names stay one of a kind. Answers the item as it now is and its index. To change an item that exists, use change_settings on its path.
list | string | |
op | string | add · remove · move · duplicate |
index | integer | |
to | integer | |
value | add: the new item (an object; for a list of plain values, the value) |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/describe_settings describe settings books:readOne part of the settings in full, for the parts the map below only names: its structure (every field: Hebrew name, what it may hold, its span or choices, what null means), the structures inside it, its current value, the value a new one starts from, and — where it holds ornaments — the ornaments there are (id and name). path: a part (zone, subst, flex, furniture.head, para_styles[0].deco, note_sep.line, templates[0], para_styles[i].text.enclosures) or one setting. Call it before changing a structure you have not seen in this conversation; not needed for the settings listed on the map.
path | string |
Answer: 200
/v1/books/{id}/actions/add_style add style books:writeAdd a new style to the book, at once (one step the user can undo). kind "character": a look for words inside a paragraph (given to text with change_text → set_looks.add_style); answers its code and its index in styles[]. kind "paragraph": a look and format for whole paragraphs (given with set_block_kind / set_paragraphs, kind "style"); heading_level n makes it a heading of that level (in the running head and the table of contents); answers its index in para_styles[]. like (a paragraph style's name): the new one a copy of it — its look, format, opening words — so "like «רגיל» but with no space after" is like «רגיל», then the one change; without it a paragraph style starts from the plain defaults (automatic line spacing, no opening words). font (a slot from list_fonts), size ({"pt": n} or {"rel": n} of the text around it), weight, color ("#rrggbb") set its letters now; everything else about it afterwards with change_settings (styles[i].… / para_styles[i].…: columns, format, first_word…).
kind | string | character · paragraph |
name | string | its Hebrew name, as the user would call it (up to 40 characters) |
font | integer | |
size | {"pt": n} or {"rel": n} | |
weight | integer | 400 regular, 700 bold: a weight the font has (omit: the font as it is) |
color | string | |
heading_level | integer | |
like | string | kind paragraph: the name of a paragraph style of the book to copy |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/list_templates list templates books:readThe site's ready designs. There is no design of a whole book, only designs of each part of its look, each part a library of its own: page — size and margins; fonts; text — the main text; headings; head — the running head and foot; notes; sep — the separator above the notes; zone — where the texts stand on the page (put only on a book with as many note regions as it places); toc — the table of contents; look — the small things of the look, a page's frame and background; title — ready title pages. Answers {part_designs}: id, part, name, about, for (the kinds of book it is marked for: gemara, halacha, chiddushim, drashot, shut, siddur, memorial — a book in memory of a person; left out: none marked), new_book: true (the design of its part a new book takes). A coherent look names several parts together (e.g. text, headings, head and notes): designs marked for the same kind of book, or those of a new book, go together. A design of a part is a look alone and fits any book: it keeps the book's region names, how many heading levels and note regions it has and how its pages are numbered; page only when the page's size was asked for.
Answer: 200
/v1/books/{id}/actions/apply_template apply template books:writePut the site's designs of parts on the book at once (one step the user can undo): parts — [{part, design}], design an id of list_templates' part_designs, one a part; every part not named stays as it is (only the notes' design when asked to design the notes alone). There is no design of a whole book: a whole look names several parts. With changes of your own over them (paths on the map, as change_settings — e.g. to fit this book: a smaller main text, the notes in two columns). Answers as change_settings.
parts | array | |
changes | array |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/find_blocks find blocks books:readParagraphs of the book's main text, by their words (niqqud and quote marks don't matter) and / or kind — h1…h6, p, "heading" (any level), "picture" (the pictures in the text), or "style:<name>" (a paragraph style's): each one's number, kind and opening words, and how many matched in all. By words or a stretch (from…to, or block for one paragraph): at most 30. By a heading kind or a style: up to 150 short lines in one answer, as [paragraph, words] — a level's headings are read in ONE call, never page by page. Use it before changing one paragraph, to have its number and opening words. full true: words whole — block one paragraph (up to 6000 characters), from…to SEVERAL in one call (up to 12000 characters together; more_from says where to go on) — to read paragraphs, never one call per paragraph, never a pattern of .{1,150}. bold ("all", "most", "opening", "some", "none"): the paragraphs by how much of them the reader sees bold — «המודגשים» a user names are most often those bold through ("all"): up to 60 as [paragraph, kind, words], within from…to.
text | string | |
kind | string | |
from | integer | |
to | integer | |
block | integer | |
full | boolean | |
bold | string | by how much of each the reader sees bold, whatever made it so (the bold mark, a bold character style, a bold style, bold first words): "all" — bold through (a line made bold by hand to stand as a sub-heading: «המודגשים», «השורות המודגשות»), "most", "opening" — opens bold, most of it not (a bold lead-in), "some", "none". Alone: of the whole main text (or of paragraphs {from, to}); with others: of those they find. Headings are bold by their style in most books: with blocks ["p"] (find_blocks: kind "p") the plain paragraphs alone |
Answer: 200
/v1/books/{id}/actions/set_block_kind set block kind books:writeMake a paragraph a heading of a level, a paragraph of a paragraph style, or a plain paragraph again: one by block, starts_with, kind (and style); SEVERAL known paragraphs in ONE call by items — each {block, starts_with, kind, style}, up to 80, each its own kind — all of them or none (each checked first), one step of the undo; answers [paragraph, before, after] for each. For many found by a rule (every paragraph that starts with…, every heading of a level): set_paragraphs.
block | integer | the paragraph's number from find_blocks (1 = the book's first) |
starts_with | string | the paragraph's opening words, as find_blocks gave them — checked, so a paragraph that moved is not the one changed |
kind | string | h1…h6 = heading level n; p = a plain paragraph; style = a paragraph style of the book, named in style (a centered line is a paragraph style whose format.align is center: use the book's, or add one first) |
style | string | with kind "style": the paragraph style's name (book_overview: paragraph_styles) |
items | array |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/add_title_page add title page books:writeAdd a title page to the book — the only way to make a new one: a part of kind title, at the book's start, in the ready design the site marks for a new book, with the book's name on it — and, where the book has none, the page behind it (kind titleback) as a part of its own right after it, so the text never starts on the title page's back. Whatever the user asks of it — its words, its look, another ready design — is changed from there with change_settings (templates[i].title.lines[j]) or apply_template; never built anew. Answers its index in templates, the design's name and its lines. A book that has a title page: refused, unless name asks for another (a second title page). One step the user can undo.
name | string | only for a second title page: its name |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/bold_title_words bold title words books:writeMake words of a title page's line bold, or of another size (size) — only those words, the rest of the line as it is (templates[i].title.lines[j].bold; never with change_settings: it counts characters) — or plain again (bold false). words: each the words of one stretch, as the line has them ("אלחנן שלמה, ר' יוסף"); found here — a quote or a geresh alike, the spaces, niqqud — every time they stand in the line. line: its index in title.lines (left out: every line of the title page that has them); part: the title page's name (left out: the book's one); only: those words alone bold in the line, any other bold of it removed. Words not on the page: nothing changes, and the lines are said. Answers as change_settings, and lines_now: each line changed, its bold words between **. One step the user can undo.
words | array | the words to make bold (or plain), each stretch as the line has it |
line | integer | the line's index in templates[i].title.lines |
part | string | the title page's name (templates[i].name), when the book has more than one |
bold | boolean | false: make them plain again (default true) |
only | boolean | these words alone bold in the line |
size | number | the words' size, a share of the line's own (1.3: larger, 0.8: smaller, 1: the line's again); alone, their weight stays as it is |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/insert_heading insert heading books:writeAdd a heading line (h1…h6) before paragraph before — or at the book's end, with before one past the last paragraph. After it, the paragraphs after it are numbered one more. Only a heading: a title page is a part of its own (add_title_page), an ornament at a chapter's end is the heading style's deco.end, a separator of asterisks is insert_separator, and a line of plain text the user adds in the editor.
before | integer | the paragraph's number from find_blocks (1 = the book's first) |
starts_with | string | the paragraph's opening words, as find_blocks gave them — checked, so a paragraph that moved is not the one changed |
text | string | the heading's words (↵: a line break inside it) |
kind | string | the heading's level: h1…h6 |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/add_part add part books:writeAdd a part to the book: its settings (a new item of templates) and its line «--- name ---» in the text, together, in this one call — a part never has settings and no line in the book. A NEW part: name and part, its settings as an item of templates is written (describe_settings templates; left empty {}: a part as the book — a contents: { "toc": {} }); never edit_list on templates for a part (it is refused), and a new title page is add_title_page, a subject index add_index. The part goes before paragraph before, which then opens its text — all of it up to the next part's line (said in the answer). A part whose pages are made (a contents, an index, pages of pictures) takes no text: at a part's first paragraph its line goes before that part's, at its last after it, and inside a part's text that part goes on after it (said in the answer). A blank page there: blank true and nothing else needed (no part; the name is given if left out or taken) — the part holds no text, and the part it stood in goes on after it. A part the settings already have and the text not (an older book): name alone puts its line in. One step the user can undo; the book_overview's parts say which are in the text; to stand elsewhere: move_part; out of the book again: remove_part (its settings go with its line).
name | string | the part's name (a new part: the name it is given) |
part | object | a NEW part: its settings, as an item of templates (without name) — {} for a part as the book. Left out for a blank page and for a part the settings already have |
before | integer | not for a title page: the paragraph the part opens before (find_blocks); with blank, left out: at the book's end |
starts_with | string | the paragraph's opening words, as find_blocks gave them — checked, so a paragraph that moved is not the one changed |
blank | boolean | a page left blank there, the part holding no text — only when the user asked for an empty page; never in place of a part that holds text (a preface, a contents) |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/edit_heading_text edit heading text books:writeChange the words of a heading (only a paragraph that is already a heading — the body of the text is the user's to edit).
block | integer | the paragraph's number from find_blocks (1 = the book's first) |
starts_with | string | the paragraph's opening words, as find_blocks gave them — checked, so a paragraph that moved is not the one changed |
text | string | the heading's new words (↵: a line break inside it — a heading in two lines) |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/set_paragraphs set paragraphs books:writeGive MANY paragraphs of the main text a kind together — a heading level, a paragraph style, plain. Which paragraphs, in where: one or a few by their numbers (paragraphs {from, to} from find_blocks, with starts_with), or a search (the same fields as find_text: every paragraph the search matches in — e.g. match "pattern", text "^סימן \\p{אות}+" for every paragraph that opens with סימן and a letter), or — without text — the paragraphs that are now of the kinds in blocks (p, h1…h6, center) or of paragraph_style, or first_after (["h1","h2"], or ["heading"]: any): the paragraph that opens what each such heading heads — the first after it that is no heading (a heading under it is passed over) — "the first paragraph of each chapter" ("אות גדולה בריש פרק": a style of its own with first_word, given to those alone); bold ("all", "most", "opening", "some", "none"): by how much of each the reader sees bold — alone, of the whole text ("all": the lines made bold through by hand to stand as sub-headings — given a style of their own, which can then be changed together), or of those the others find; paragraphs {from, to} keeps it to a stretch of the book. The user is shown a card — how many paragraphs, some of them, and what it does to the book's structure (headings that stop being headings leave the contents and the running head) — and the call waits until they approve: it answers applied true with the count, or false with what they wrote instead. title: one short Hebrew line saying what will change, for the card.
title | string | |
kind | string | h1…h6 = heading level n; p = a plain paragraph; style = a paragraph style of the book, named in style (a centered line is a paragraph style whose format.align is center: use the book's, or add one first) |
style | string | with kind "style": the paragraph style's name (book_overview: paragraph_styles) |
where | object |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/remove_paragraphs remove paragraphs books:writeTake whole paragraphs of the main text out of the book together, each with its line — the only way to remove a paragraph (change_text cannot remove a line). Which, in where, as set_paragraphs: one or a few by their numbers (paragraphs {from, to} from find_blocks, with starts_with — the way for a paragraph you have found), or of the kinds in blocks (each level by itself: ["h4","h5"] is those two levels alone) or of paragraph_style, or every paragraph a search matches in; empty true: only paragraphs with no words (alone, or with blocks); paragraphs {from, to}: a stretch. A card shows the user how many and some of them, and the call waits: applied true with removed, or false with what they wrote instead; left_out: what it can't take out and why — a part's line (remove_part), a paragraph a note's sign stands in (remove_notes first). title: one short Hebrew line for the card.
title | string | |
where | object |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/find_text find text books:readSearch the book's texts with the studio's proofing engine (the fields: "How the engine matches" below) — nothing is changed. Answers how many places were found, how many in each text, and up to 10 of them spread over the book, each with the words around it — and what the words alone do not show: looks, the match cut into stretches where part of it is bold or in a character style (absent: all of it plain), and spaces, its spaces by kind, in order, where one is not the regular space (thin, no-break …); given replace or set_looks, also what each would become; mended: what was set right in your wording before it ran (quote marks, examples of more than one paragraph). Use it to answer a question about the text ("כמה פעמים…", "איפה כתוב…"), and ALWAYS before change_text: look at the samples — if they show places that shouldn't be found, or miss ones that should, mend the search and look again. When the user asks to SEE places ("תראה לי איפה…", "איפה מוזכר…", "אילו…"), pass show_user true with a title: they get a card listing the places, each opening its place in the book — then answer in a sentence, without repeating the list.
match | string | exact · spelling · pattern |
text | string | the words (exact / spelling) or the expression (pattern); empty with looks alone |
whole_word | boolean | |
prefixes | boolean | left out with whole_word true (not in a pattern): true — the word with its prefix letters; false only for the exact letters |
wildcards | boolean | |
ignore | object | |
streams | array | the texts searched, by code (book_overview: texts; 0 the main text); left out: all |
blocks | array | kinds of paragraph the search looks in; left out: all. Here h3 is every heading of level 3 AND DEEPER (h4, h5, h6 too) — to act on the headings of one level exactly, use set_paragraphs / remove_paragraphs with where.blocks |
paragraphs | object | |
looks | object | |
examples | array | 3–6 short Hebrew examples the engine runs before the search: where it must match, and a close miss where it must not. Each is one paragraph of plain text, read with the search's own ignore — not by its blocks, streams, looks, paragraphs or the selection: a miss that only those leave out is no example |
replace | string,null | the new text, plain ("" deletes; a pattern's template: $1 …; ¶ a new paragraph; ↵ a line break inside the paragraph, which goes on in the next line); null / left out: the text stays. Bold or a style is set_looks — never * or ** in the text: they are printed as stars |
set_looks | object | |
paragraph_list | array | several stretches of paragraphs (numbers from find_blocks) in ONE search — in place of paragraphs; never a call per paragraph |
more | array | more words searched the same way (the same match, ignore, place and looks), each with its own replacement (left out: replace's) — several word pairs (מאוד → מאד, כיוון → כיון…) in ONE call and one card; the answer counts each |
title | string | with show_user: the card's title, one short Hebrew line |
Answer: 200
/v1/books/{id}/actions/change_text change text books:writeChange what a search finds (the search fields: as find_text), everywhere it finds it: other text (replace), or the same text in another look (set_looks: a character style added or removed, bold, source-reference) — the only way the book's words are changed. The user is shown a card — every place, before → after, each opening its place in the book; the places are also marked on the pages — and the call waits until they approve: it answers applied true with how many places were changed (they may leave some places out: then also how many), or false with what they wrote instead (then do what they wrote; don't propose the same again). One undo takes the whole change back. Several word pairs, or several stretches of paragraphs: ONE call (more, paragraph_list), one card. title: one short Hebrew line saying what will change, for the card ("האות שבתחילת כל סעיף — בסגנון «אות סעיף»"). Give examples whenever the search is a pattern.
title | string | |
match | string | exact · spelling · pattern |
text | string | |
whole_word | boolean | |
prefixes | boolean | |
wildcards | boolean | |
ignore | object | |
streams | array | |
blocks | array | |
paragraphs | object | |
looks | object | |
examples | array | |
replace | string,null | the new text, plain ("" deletes; a pattern's template: $1 …; ¶ a new paragraph; ↵ a line break inside the paragraph, which goes on in the next line); null / left out: the text stays. Bold or a style is set_looks — never * or ** in the text: they are printed as stars |
set_looks | object | |
paragraph_list | array | |
more | array |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/insert_text insert text books:writePut text THE USER wrote or pasted in this conversation (an index, an introduction, a list they gave) into the book's main text as paragraphs, word for word — never a text of your own (checked: what is not theirs is refused). text: their text, a paragraph a line; before: the paragraph it goes before (find_blocks), with starts_with; left out — at the book's end; part: a part's name (templates[i].name) whose line «--- name ---» opens it, when it is defined and not in the text yet (an index: define a part of kind index first with edit_list). title: one short Hebrew line for the card. The user is shown a card and the call waits for their approval. One step the user can undo.
text | string | |
before | integer | |
starts_with | string | with before: the words that open that paragraph, as find_blocks gave them — checked, so a paragraph that moved is not the one written before |
part | string | |
title | string |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/format_paragraphs format paragraphs books:writeA paragraph's OWN formatting, over its style, for the paragraphs found alone — as the editor's design window sets it on a paragraph: one heading on a new page, space after one heading, one note with no lone word on its last line or with tighter word spacing, one paragraph centered. Never a new style for it, never its style's setting (every paragraph of the style shares that). Which, in where: selection true — the paragraphs the user selected (on the page or in the editor); or as set_paragraphs: paragraphs {from, to} with starts_with, a search (text, … — in notes too with streams [their codes]), blocks, paragraph_style, first_after, bold (by how much of them is bold: "all" — the lines made bold through, alone or with the others). set: each field with its value, as the style's own of the same name on the map reads it — break_before ("page", "odd", "even", "none"), keep_with_next, keep, space_before / space_after (lines), space_before_pt / space_after_pt, align, indent, hang, margin_start_mm, margin_end_mm, leading, word_space, center_last, center_single, avoid_lonely_word, keep_with_prev (never parted from the paragraph before it), tight_next, keep_whole (soft: kept whole on one page where the pages allow), tabs (its tab stops, whole: {"columns": n} or {"stops": [{pos_mm, align, leader}]} — the map's ParaFormat.tabs), hyphenate, direction, columns, size ({"pt": n}, or {"rel": r} of its style's), font, weight, color, width, track; null gives that field back to the style. clear true: all their own formatting taken away. More than 3 paragraphs: a card first, and the call waits. Answers what came onto the pages (visible / no_visible_change). One step the user can undo.
title | string | one short Hebrew line saying what changes, for the turn's list and a card |
where | object | |
set | object | field → value (null: back to the style) |
clear | boolean |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/read_looks read looks books:readWhat sets the look of paragraphs as the reader sees them — read before saying a place looks as its style says, and whenever the user says one place is bigger, smaller or other than its kind elsewhere, or that a change didn't reach it: per paragraph its style, its font and size in points, own_formatting (set on it alone, over its style: kept when the style changes), character_styles on its words (their look and the words), brackets (the text's rule for words between marks: places and the longest in words). Which, in where, as format_paragraphs: selection true (only the selected words' looks), paragraphs {from, to} with starts_with, a search (text), blocks, paragraph_style, bold (by how much of them is bold). At most 12 paragraphs. Reads only.
where | object |
Answer: 200
/v1/books/{id}/actions/remove_part remove part books:writeTake a part out of the book — its line «--- name ---» out of the text (a title page, contents, an introduction that should not be printed: «תוריד את השער»): its pages are no longer made, and its settings (templates) go with its line — the book has no part with settings and no line; to have it again it is made anew (add_title_page; add_part with part). Text the part had goes on in the part before it — said in the answer (to remove that text too: remove_paragraphs). A blank page taken out of the middle of a part's text takes with it the part that only went on after it («X (המשך)»): the text is one part again. The user is shown a card and the call waits. One step the user can undo.
name | string | the part's name, as its line in the text has it (book_overview: parts) |
nth | integer | only when the text opens a part of that name more than once: which (from 1) |
title | string |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/move_part move part books:writeMove a part — its line and all its text, with their notes — to stand before another part (before: that part's name), or to the book's end (before left out): the order of the book's parts («התוכן אחרי השער»). The user is shown a card and the call waits. Answers the parts' order now. One step the user can undo.
name | string | the part's name, as its line in the text has it (book_overview: parts) |
nth | integer | only when the text opens a part of that name more than once: which (from 1) |
before | string | the part's name, as its line in the text has it (book_overview: parts) |
before_nth | integer | only when the text opens a part of that name more than once: which (from 1) |
title | string |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/move_paragraphs move paragraphs books:writeMove whole paragraphs of the main text to another place — or copy them (copy true) — never by insert_text (that leaves them twice, and retyped). paragraphs {from, to} with starts_with (and last_starts_with, the last one's opening words, for more than one); where to: before or after a paragraph (its number, with target_starts_with), or to_end. They go as they are: style, looks, notes (renumbered in order), index marks. A copy can't hold notes (a note has one sign). A part's line is not moved here (move_part). The user is shown a card and the call waits. Numbers change after it: find_blocks again. One step the user can undo.
paragraphs | object | |
starts_with | string | the paragraph's opening words, as find_blocks gave them — checked, so a paragraph that moved is not the one changed |
last_starts_with | string | |
before | integer | the paragraph's number from find_blocks (1 = the book's first) |
after | integer | the paragraph's number from find_blocks (1 = the book's first) |
target_starts_with | string | |
to_end | boolean | |
copy | boolean | |
title | string |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/insert_separator insert separator books:writePut a separator between two pieces of the text before paragraph before (one past the last: at the end): a line of asterisks the book draws as its separator ornament, with room above and below (text_sep; turned on with the book's own end-of-chapter ornament where it has none, as «הוספה › עיטור בין קטעים», on the top bar and in the editor). Never a heading of a «*» (it would enter the contents and the running head). One step the user can undo.
before | integer | the paragraph's number from find_blocks (1 = the book's first) |
starts_with | string | the paragraph's opening words, as find_blocks gave them — checked, so a paragraph that moved is not the one changed |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/remove_notes remove notes books:writeTake notes out of the book — each note with its sign in the text, as erasing the sign in the editor does (never by emptying their words: that leaves the signs). Which, in where: selection true — the notes whose signs are in what the user selected; paragraphs {from, to} with starts_with — those whose signs are in those paragraphs; all true — every note of the text of notes region; empty true — only notes with no words (alone: in every text of notes). region: a text of notes by its code (book_overview: texts). The user is shown a card of the notes and the call waits. One step the user can undo.
region | integer | |
where | object | |
title | string |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/move_notes move notes books:writeMove notes to another text of notes, each keeping its words and its sign where it stands (renumbered in its new text, in the text's order) — also the way to split one text into two («ההערות הקצרות לאזור נפרד מתחת») and to merge two. Which, in where: selection, paragraphs {from, to} with starts_with, or all — as remove_notes — or rule (with region): paragraph_style (the style the note's first paragraph has — a Word book's «footnote text 2»; "" or the text's own style: those of none of their own), mark (the sign they open with: * @ # …; it stays in their words), opens_with or contains (words, as find_text reads them). Where to, in to: region (an existing text, by code), or new: "below" (default for a split: a new text under this one) / "beside" (side by side with it) with name — a copy of the source's design and numbering, with a sign of its own. merge true (with where.all, region and to.region): all of it into the other, and the emptied text then removed with its design — say that first. Not moved: notes on notes. The user is shown a card and the call waits. One step the user can undo.
region | integer | |
where | object | |
to | object | |
merge | boolean | |
title | string |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/move_to_notes move to notes books:writeMove text OUT of the main text INTO a text of notes — a commentary, glosses or a second work the user wrote inside the main text (a commentary after each paragraph, two works one after another, notes typed as plain text). Which, in where: selection true — what the user selected, on the page or in the editor (words inside one paragraph become one note, its sign where they stood); paragraphs {from, to} with starts_with — those paragraphs; paragraph_style — every paragraph of that style. Each run of paragraphs one after another becomes ONE note of several paragraphs (headings and styles kept), its sign at the end of the paragraph before it. link "headings": two works written one after another — each heading of the moved text, with what follows it, goes beside the main text's heading of the same words or number (the commentary's chapter 3 beside the main text's chapter 3). to: region — a text of notes the book has (its code, book_overview: texts), or new_name — a new text of notes by that name (made with no number shown: its signs are anchors alone, as Rashi on a daf). A note on the moved text is refused (it can't be moved with notes on it yet). The user is shown a card and the call waits; one step the user can undo. Answers offer_layout: the ready pages that set the text beside the main text (beside; around: this one text on both sides of it, read like two columns — right, then left; sides: one text at each side, the Vilna page) as change_settings changes — offer them (ask_user) after moving, never set one unasked.
title | string | one short line saying what moves, for the card and the turn's list |
where | object | |
to | object | |
link | string | before · headings |
Answer: 200 · Idempotency-Key
/v1/books/{id}/actions/read_cover read cover books:readThe book's cover for the printer, flat: {path: value} by the paths change_cover takes — binding (soft: glued in a card cover; hard: boards; staple: a stapled booklet, no spine), spine_turn (which way the spine's lines run: auto by its width, down — read from the top down, up, across, none), color (the sheet's colour "#rrggbb", null the paper's), spine.color (the spine's own colour, over the sheet's — a ready cover may give it one, a dark spine on a light cover; null: none, the spine is the sheet's colour — «למה השדרה ירוקה/כהה»: this), margin_mm (the room kept from each edge of the front and the back), spine_mm (the spine's width as the printer gave it; null: estimated by the pages and the paper), paper, marks (crop and fold marks), bleed_mm; and each panel — front, spine, back: valign (where its lines stand: top, upper — a third down, center, spread — the room shared evenly among them, each line in the middle of its share: «שורה בשליש העליון ושורה בשליש התחתון»), margins (its own, mm, inner at the spine; null: margin_mm all round; the spine's: its top and bottom alone, along it — its sides are its folds' room, whatever they say), gap_mm (with valign spread: the space between each line and the next, mm — the lines together in the middle, that far apart: «לקרב / להרחיק את השורות בשדרה»; null: the room shared evenly), its lines <panel>.lines[j]… (each a title page's line: role, text, look — font, size, weight, colour —, format — alignment, space before and after —, bold words), the frame around its lines <panel>.lines_frame. look: the ready cover it is in now (null: a design of its own). designed false: none was designed yet — this is the one the cover's room starts from (the title page's lines). Call it before change_cover.
Answer: 200
/v1/books/{id}/actions/change_cover change cover books:writeChange the book's cover, as one step the user can undo. look — a whole ready cover put on it: its ground, its inks, a frame, a line under the book's name, the spine; what is written, its fonts and sizes stay, pictures go (plain — white, no ornament; classic — cream, a thin frame, a line under the name; navy — dark blue and gold, a double frame, a line with a diamond; wine — burgundy and cream, framed; forest — dark green and gold; night — black and gold; gilt — white with a gold double frame; plate — dark blue, the front's lines on a light plate; label — burgundy, a cream label; sky — light blue, a dark blue spine; stone — warm grey, quiet; band / sash / bar — the book's name on a band of colour across the front (dark blue on white / burgundy on cream / gold on black); ribbon — cream, a burgundy spine). «תעשה לי כריכה» / «עיצוב יפה לכריכה»: put on the look that suits the book and say which, and that the others are in the cover's room («כריכה מוכנה») to press; a colour or a detail asked beside it goes in changes of the same call. Then lines — a line added to a panel (op add, value its fields as a title page's line: role, text, and any of look / format — left out take the defaults; index where, default at the end), removed, moved (to) or duplicated, at index —, then changes: each a path as read_cover gives it and its new value — a line's field (front.lines[0].text, spine.lines[1].look.size {"rel": 1.2} or {"pt": n}, back.lines[2].format.align, front.lines[0].look.font by its slot from list_fonts), a whole line as an object, the frame around a panel's lines (front.lines_frame), a panel's valign, margins or gap_mm, or the cover's own (binding, spine_turn, color, margin_mm, spine_mm, paper, marks, bleed_mm). spine.color: the spine's own colour "#rrggbb" (its words take an ink that reads on it), null takes it off — the spine then is the cover's colour. A line is checked as a title page's line is (its fields, fonts and spans, like change_settings); the cover's own fields keep only their choices and limits; the engine draws the result last. What fails is rejected and said why, the rest applied. A picture is taken off by null: picture (the one behind the whole cover), front.picture / back.picture / spine.picture; a frame near a panel's edges by front.frame null. picture.ink: the picture behind the whole cover drawn in one colour (#rrggbb) — its darks in it, its lights toward white («התמונה בזהב», a grey texture in the cover's colour); null: its own colours. Not here — the user does it in the cover's room: choosing a picture behind the cover or a panel (from their art library), drawing a frame near a panel's edges, a hard cover's measures. The cover is not on the book's pages: say that it is seen in «חלקים» › «כריכה» (show_place parts).
look | string | plain · classic · navy · wine · forest · night · gilt · plate · label · sky · stone · band · sash · bar · ribbon |
lines | array | |
changes | array |
Answer: 200 · Idempotency-Key
The book's saved versions, and its proofreading link
/v1/books/{id}/versions The book's versions books:readAnswer: 200
/v1/books/{id}/versions Save a version books:writename | string |
Answer: 201 · Idempotency-Key
/v1/books/{id}/restore Restore a version books:writeThe book made again as it was at the version — a new change of the user's (nothing is lost). Without version: the one saved before this credential's latest series of changes, i.e. that series taken back.
version | string | A record's id: 15 lowercase letters and digits |
Answer: 200 · Idempotency-Key
/v1/books/{id}/proof-link The proofreading link books:readThe book's writers alone.
Answer: 200
/v1/books/{id}/proof-link Make a proofreading link books:writeAs the studio's «שליחה להגהה»: whoever opens it proofreads this book alone, with no account, and their remarks come to the book. The link in force, or a new one; in force until cancelled. The book's writers alone, with a verified address.
Answer: 200
/v1/books/{id}/proof-link Cancel the proofreading link books:writeWhoever holds it is turned away (an open page too); the next POST makes another.
Answer: 204
Pictures of the book's pages as typeset
/v1/books/{id}/pages Pictures of pages books:readAs the studio shows them; a book not paid for under the words of a preview. Each sets the whole book: they have a limit of their own.
from | integer | |
count | integer | |
width | integer | Pixels |
Answer: 200
/v1/books/{id}/pages/{page}.webp One page's picture books:readwidth | integer | Pixels |
Answer: 200
The book's files — the PDF for print, a proof copy, the cover, InDesign
/v1/books/{id}/exports Make a file of the book exportAs the studio's «ייצוא», at its prices: a book not paid for gives its first pages (result.kind: sample) and result.pay_url, the studio's page where it is paid for — the API never takes a payment. The cover is of a book paid for alone (402 with pay_url). A job: follow Location, or a webhook export.ready.
format | string | pdf · proof · cover · idml |
Answer: 202 · Idempotency-Key
/v1/files/{id} A file madeThe address is the job's result (file.url): signed, for a day, no credential needed.
exp * | string | |
sig * | string |
Answer: 200
Endpoints told when a job ends (Standard Webhooks 1.0)
/v1/webhooks The endpoints webhooksAnswer: 200
/v1/webhooks Add an endpoint webhookshttps, at a public address. Its secret is given this once.
url | string | |
events | array | |
description | string |
Answer: 201 · Idempotency-Key
/v1/webhooks/{id} One endpoint webhooksAnswer: 200
/v1/webhooks/{id} Change an endpoint webhooksurl | string | |
events | array | |
description | string | |
active | boolean |
Answer: 200
/v1/webhooks/{id} Remove an endpoint webhooksAnswer: 204
/v1/webhooks/{id}/test Send a test event webhooksAnswer: 202
/v1/webhooks/{id}/deliveries The latest deliveries webhookslimit | integer |
Answer: 200