share
v0.10.0Send a web page to specific people, control who opens it, see how it was read, and update it.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_documents List documents on this account
Lists the account's documents, newest first: the title, when it was created, how many tracked links point at it, and its document id. A document with no links appears here and not in list_shares, which lists only documents that have been sent. It returns no document contents. Returns at most 50 per call; the `before` cursor pages back through older documents.
| Parameter | Type | Description |
|---|---|---|
before | string | Cursor for the next page: the `next_before` value printed at the end of a previous list_documents result, of the form <created_at>|<document id>. Its exact value selects the next page; omission select… |
list_attachments List a document's attached files
Lists the files attached to a document on HTMLRadar (supporting materials a reader can download beside the page): the file name, its size and the attachment id. It returns no file contents and changes nothing. After an add_attachment call that gave no answer, this list shows whether the file was attached.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | The document: the document id from list_documents or list_shares. |
add_attachment Attach a file to a document
Attaches one file to a document already on HTMLRadar, for readers of its links to download. The file types are the website's (PDF, Office documents, images, CSV, text, Markdown, ZIP) and a document holds up to 20 files. The file travels as base64 in `content_base64`, because a tool argument is JSON, so it can be at most 5.0 MB, the same limit as publishing a page this way; a larger file (the website takes 25 MB) is added on the website. Readers see the file from the next time they load the page. There is no file-path argument.
| Parameter | Type | Description |
|---|---|---|
content_base64 * | string | The file's contents, base64-encoded. |
document_id * | string | The document: the document id from list_documents or list_shares. |
filename * | string | The file name with its extension, e.g. "pricing.pdf". The extension decides the type. |
remove_attachment Remove a file from a document
Removes one attached file from a document. Downloads stop at once, even from a page a reader already has open; the file leaves the page's list the next time the page loads. Copies a reader already downloaded stay with them. It removes the file only: the page, its links and its reading history are untouched, and there is no tool that deletes a page or a link. The file cannot be recovered from HTMLRadar; attaching it again needs the original file. list_attachments returns the attachment id.
| Parameter | Type | Description |
|---|---|---|
attachment_id * | string | The attachment id from list_attachments. |
document_id * | string | The document the file is attached to: from list_documents or list_shares. |
get_reading_records Get a document's reading records
Returns the reading records the HTMLRadar website exports as a spreadsheet, as CSV text: for readers shown in full, one row per section per read (a read with no section recorded has one row with the section columns blank; section_status says "not measured" when the page changed while it was being read, so no section time was taken), with the link's label and slug, the reader, whether their address was verified, when they opened it, how long they read, how far they scrolled, and their country and device where recorded; proved_by says how each read got in (code, microsoft, google, password, addr…
| Parameter | Type | Description |
|---|---|---|
document_id * | string | The document: the document id from list_documents or list_shares. |
continue_from | string | The `continue_from` value a previous answer gave selects the rows after it. Omission starts from the first row. |
share_id | string | Limit the records to one link: the share id, the share's slug, or the link itself. |
replace_document Replace a document, keeping every link
Replaces the contents of a document already on HTMLRadar, which is how a page that has been sent is updated. Every existing link stays exactly as it is (same address, same settings, same reading history) and serves the new contents from the next time it is opened, so nobody is sent a second link; a link that is switched off or past its end date stays closed. The new HTML is screened for phishing signals as every upload is, and readers of a page the screen holds see that it is not available yet. The previous version stays listed in the document's version history on the website. There is no rest…
| Parameter | Type | Description |
|---|---|---|
document_id * | string | The document whose contents are being replaced. Every link to it keeps working. |
expected_version * | integer | The document's current version as you last saw it: get_document and list_documents show it, and each replace_document result gives the new one. When the document has been replaced since, nothing is re… |
announce | boolean | Whether readers see what changed and subscribers receive an alert. Omitted means an announcement only when every live link is company-only; otherwise the replacement is quiet. |
edits | array | Changes to the page get_document returned, applied in order. Each `find` must appear exactly once in the page at that point. Between 1 and 200. Mutually exclusive with `html`. |
html | string | The new HTML markup, in full. It may keep the htmlradar-image references get_document returned. Mutually exclusive with `edits`. |
note | string | Optional note for an announced update, at most 140 characters. |
request_id | string | Optional on a first attempt. When a previous call may have been applied, the request_id named by its error makes a retry return the first result instead of doing it twice. |
get_document Read a document to change it
Returns the current contents of a document on HTMLRadar so they can be changed and put back with replace_document. A change to a page already on HTMLRadar is made this way, for pages up to 30 MB, the same limit as the website: read the page here, then send the edited short form, or only the changes, to replace_document; a whole new file is needed only to replace the page itself. Each embedded PNG, JPEG, GIF and WebP image appears as a short htmlradar-image reference instead of its data; unchanged references restore the original images, and other embedded images, such as SVG, stay in the markup…
| Parameter | Type | Description |
|---|---|---|
document_id * | string | The document to read: the document id from list_documents or list_shares. |
query | string | Text to find, 1 to 200 characters, matched literally with letter case ignored, such as a product name or a price. Returns up to 20 passages around the matches, and how many there are, instead of the w… |
whoami Show the HTMLRadar plan and free links used
Reports which HTMLRadar account the API key belongs to (its email address), the plan it is on and how many of its free tracked links it has used out of the free allowance, or that tracked links are unlimited. It also reports what this connection may do (read only, or read and publish), any notice about the plan, and any notice about a newer version of the HTMLRadar package.
get_page_guidelines Get page guidelines
Returns HTMLRadar's guidelines for pages that read well on phones and give accurate section reading times. It reads no account data and changes nothing.