Partially update journal entry
Updates only the provided fields of an existing journal entry. Fields not provided will remain unchanged.
What can be updated:
- Entry content (body) - optional
- Mood indicator - optional
- Reminder date - optional
Note: You can only update your own journal entries. The body field accepts HTML or Markdown input and is stored internally in IDoc format.
PATCH
/account/journal/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonbodystringAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**table**
Type: block
Content: tableRow+
Atts: none
```html
<table style="width: 0px;"><colgroup></colgroup><tbody><tr></tr></tbody></table>
```
**tableRow**
Content: (tableCell | tableHeader)*
Atts: none
```html
<tr></tr>
```
**tableHeader**
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts:
- colspan: 1
- rowspan: 1
- colwidth: null
- align: null
```html
<th colspan="1" rowspan="1" colwidth="null/some-value" style="text-align: null/some-value;"><p class="paragraph-base"></p></th>
```
**tableCell**
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts:
- colspan: 1
- rowspan: 1
- colwidth: null
- align: null
```html
<td colspan="1" rowspan="1" colwidth="null/some-value" style="text-align: null/some-value;"><p class="paragraph-base"></p></td>
```
**callout**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Callout / info box. The icon attr is an emoji shortcode (e.g. :information_source:, :warning:); it appears on the callout. Body is block content (paragraphs, lists, etc.) — use normal block HTML such as <p class="paragraph-base"> inside the callout <div>. data-type is "callout".
Atts:
- icon: :information_source:
```html
<div data-type="callout" icon=":information_source:"><p class="paragraph-base"></p></div>
```
**appImage**
Type: block
Block for an image file already uploaded in Leadtime.
- fileId: Id of the stored image. Must be a real uploaded file; do not invent.
- filename: Display name; should match the file.
- width, align, size: Layout as in the editor. If no file id is available, obtain one via upload/API before outputting this node with a fake id.
Atts:
- fileId:
- filename:
- width: 500
- align: left
- size: 0
```html
<div data-type="appImage" fileid="" filename="" width="500" align="left" size="0"></div>
```
**collapse**
Type: block
Content: collapseTitle collapseBody (a collapse title node, then a collapse body)
Expandable/collapsible section. Required structure: one collapseTitle (summary, inline) then one collapseBody (blocks) as direct children, matching data-type= collapseTitle / collapseBody tags under <collapse>. Do not use title/body nodes outside of a collapse.
Atts: none
```html
<collapse><collapse-title></collapse-title><collapse-body><p class="paragraph-base"></p></collapse-body></collapse>
```
**collapseBody**
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Expandable body of a collapse. Only use as sibling of collapseTitle inside a collapse; holds the block content that shows when expanded.
Atts: none
```html
<collapse-body><p class="paragraph-base"></p></collapse-body>
```
**collapseTitle**
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Clickable title row of a collapse block. Only use inside a collapse that also has collapseBody; content is the summary line shown when collapsed.
Atts: none
```html
<collapse-title></collapse-title>
```
**emoji**
Type: inline
Inline emoji. icon is a colon shortcode (e.g. :thumbsup:, :white_check_mark:) stored in data-icon; body is often empty. Use names your emoji set supports; avoid inventing invalid shortcodes in final HTML if you need them to render.
Atts:
- icon: :smile:
```html
<span data-type="emoji" data-icon=":smile:"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
idstringJournal entry ID for updates
moodstringMood of the journal entry
Allowed:
SadNeutralHappyreminderstringReminder date
Responses
200
bodystringrequiredAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**table**
Type: block
Content: tableRow+
Atts: none
```html
<table style="width: 0px;"><colgroup></colgroup><tbody><tr></tr></tbody></table>
```
**tableRow**
Content: (tableCell | tableHeader)*
Atts: none
```html
<tr></tr>
```
**tableHeader**
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts:
- colspan: 1
- rowspan: 1
- colwidth: null
- align: null
```html
<th colspan="1" rowspan="1" colwidth="null/some-value" style="text-align: null/some-value;"><p class="paragraph-base"></p></th>
```
**tableCell**
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts:
- colspan: 1
- rowspan: 1
- colwidth: null
- align: null
```html
<td colspan="1" rowspan="1" colwidth="null/some-value" style="text-align: null/some-value;"><p class="paragraph-base"></p></td>
```
**callout**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Callout / info box. The icon attr is an emoji shortcode (e.g. :information_source:, :warning:); it appears on the callout. Body is block content (paragraphs, lists, etc.) — use normal block HTML such as <p class="paragraph-base"> inside the callout <div>. data-type is "callout".
Atts:
- icon: :information_source:
```html
<div data-type="callout" icon=":information_source:"><p class="paragraph-base"></p></div>
```
**appImage**
Type: block
Block for an image file already uploaded in Leadtime.
- fileId: Id of the stored image. Must be a real uploaded file; do not invent.
- filename: Display name; should match the file.
- width, align, size: Layout as in the editor. If no file id is available, obtain one via upload/API before outputting this node with a fake id.
Atts:
- fileId:
- filename:
- width: 500
- align: left
- size: 0
```html
<div data-type="appImage" fileid="" filename="" width="500" align="left" size="0"></div>
```
**collapse**
Type: block
Content: collapseTitle collapseBody (a collapse title node, then a collapse body)
Expandable/collapsible section. Required structure: one collapseTitle (summary, inline) then one collapseBody (blocks) as direct children, matching data-type= collapseTitle / collapseBody tags under <collapse>. Do not use title/body nodes outside of a collapse.
Atts: none
```html
<collapse><collapse-title></collapse-title><collapse-body><p class="paragraph-base"></p></collapse-body></collapse>
```
**collapseBody**
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Expandable body of a collapse. Only use as sibling of collapseTitle inside a collapse; holds the block content that shows when expanded.
Atts: none
```html
<collapse-body><p class="paragraph-base"></p></collapse-body>
```
**collapseTitle**
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Clickable title row of a collapse block. Only use inside a collapse that also has collapseBody; content is the summary line shown when collapsed.
Atts: none
```html
<collapse-title></collapse-title>
```
**emoji**
Type: inline
Inline emoji. icon is a colon shortcode (e.g. :thumbsup:, :white_check_mark:) stored in data-icon; body is often empty. Use names your emoji set supports; avoid inventing invalid shortcodes in final HTML if you need them to render.
Atts:
- icon: :smile:
```html
<span data-type="emoji" data-icon=":smile:"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
createdAtstringrequiredcreatedBystringrequiredID of the user who created the journal entry
idstringrequiredmoodobjectMood of the journal entry
reminderobjectReminder date
400Validation errors
errorsobjectShow propertiesHide properties
bodystring[]reminderstring[]messagestringstatusCodenumber401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PATCH "https://leadtime.app/api/public/account/journal/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "<p>Today was a great day!</p>",
"id": "123e4567-e89b-12d3-a456-426614174000",
"mood": "Happy",
"reminder": "2024-06-15T09:00:00.000Z"
}'const response = await fetch("https://leadtime.app/api/public/account/journal/string", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"body": "<p>Today was a great day!</p>",
"id": "123e4567-e89b-12d3-a456-426614174000",
"mood": "Happy",
"reminder": "2024-06-15T09:00:00.000Z"
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/account/journal/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"body": "<p>Today was a great day!</p>",
"id": "123e4567-e89b-12d3-a456-426614174000",
"mood": "Happy",
"reminder": "2024-06-15T09:00:00.000Z"
},
)Response
{
"body": "string",
"createdAt": "2024-06-01T10:30:00.000Z",
"createdBy": "123e4567-e89b-12d3-a456-426614174001",
"id": "123e4567-e89b-12d3-a456-426614174000",
"mood": "Happy",
"reminder": "2024-06-15T09:00:00.000Z"
}{
"errors": {
"body": [
"Body is required."
],
"reminder": [
"Reminder must be a valid ISO8601 date."
]
},
"message": "Bad Request",
"statusCode": 400
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions