Edit A Document
The company to use
The thread whose document you want to modify
markdown. Defaults to
The html or markdown content of the new document.
The id for the section you want to modify. Required for some
Where we should insert the new content. Defaults to
0: APPEND - Append to the end of the document.
1: PREPEND - Prepend to the beginning of the document.
2: AFTER_SECTION - Insert after the section specified by section_id.
3: BEFORE_SECTION - Insert before the section specified by section_id.
4: REPLACE_SECTION - Delete the section specified by section_id and insert the new content at that location.
5: DELETE_SECTION - Delete the section specified by section_id (no content required).
Incrementally modifies the content of a document.
We determine where to insert the new content based on the
location argument. Some
location values are relative to another section, which is specified by
section_id, enabling fine-grained editing. For example, to add an item to the end of a checklist, you would send the ID of the last list item in the list as the
section_id and send
2: AFTER_SECTION as the
To get the IDs of sections in an existing document, parse the HTML returned by the methods above. Every paragraph, list item, and table cell will have an HTML
id attribute you can use in this method.
content is required for all calls unless the location is
5: DELETE_SECTION, which indicates we should simply delete the specified
section_id. Any images referenced must have been previously uploaded separately.
We return the updated thread in the format specified in Get Thread