Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Partially update employee journal entry

Updates specific fields of an existing employee journal entry. Only provided fields are updated; all fields are optional.

What you can update:

  • employeeId (optional): Change which employee this entry is associated with
  • body (optional): Update the rich text content (HTML or Markdown format)
  • mood (optional): Change the emotional indicator (Happy, Neutral, or Sad)
  • reminder (optional): Update or clear the reminder date
    • Provide an ISO 8601 date string (e.g., “2024-12-31”) to set/update
    • Provide null to clear an existing reminder
    • Omit the field to keep the existing reminder unchanged

Access control:

  • Users with Employees.edit permission can update any journal entry
  • Employees can update their own entries (creator or subject)
  • If updating employeeId, the new employee must exist and be accessible
  • Returns 404 if the entry does not exist, has been deleted, or the user does not have access
  • Returns 400 if the new employeeId is invalid or not accessible

Visibility behavior:

  • If changing employeeId to the user’s own employee record, visibleToSubject is automatically set to true
  • Otherwise, the existing visibleToSubject value is preserved

What is returned: The complete updated journal entry with all fields, including the body converted to HTML format and updated timestamps.

PATCH/employees/journal/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced 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:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
bodystring

Updated rich text content for the journal entry in HTML or Markdown format. The content is automatically converted to the internal document format (IDoc) for storage. Supports headings, paragraphs, lists, links, and formatting. Accepts 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
<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
<h1 class="heading-base"></h1>

bulletList Type: block list Content: listItem+ Atts: none

<ul class="list-base"><li></li></ul>

hardBreak Type: inline Atts: none

<br>

horizontalRule Type: block Atts: none

<hr class="hr-base">

orderedList Type: block list Content: listItem+ Atts:

  • start: 1
  • type: null
<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

<li></li>

blockquote Type: block Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts: none

<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>

table Type: block Content: tableRow+ Atts: none

<table style="width: 0px;"><colgroup></colgroup><tbody><tr></tr></tbody></table>

tableRow Content: (tableCell | tableHeader)* Atts: none

<tr></tr>

tableHeader Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts:

  • colspan: 1
  • rowspan: 1
  • colwidth: null
  • align: null
<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
<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:
<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
<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

<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

<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

<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:
<span data-type="emoji" data-icon=":smile:"></span>

Marks

link Atts:

  • href: null
  • target: _blank
  • rel: noopener noreferrer nofollow
  • class: null
  • title: null
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>

bold Atts: none

<strong>bold text example</strong>

code Atts: none

<code>code text example</code>

italic Atts: none

<em>italic text example</em>

strike Atts: none

<s>strike text example</s>

underline Atts: none

<u>underline text example</u>

If omitted, the existing body content remains unchanged.

employeeIdstring

UUID of the employee to associate this journal entry with. If provided, changes which employee this entry is about. The new employee must exist and be accessible. If the new employee is the current user's own employee record, visibleToSubject will be automatically set to true. If omitted, the existing employee association is preserved.

moodstring

Updated emotional indicator for the journal entry. Options: Happy (positive interaction), Neutral (standard/neutral interaction), or Sad (negative or concerning interaction). If omitted, the existing mood value remains unchanged.

Allowed:SadNeutralHappy
reminderobject | null

Updated reminder date in ISO 8601 format (YYYY-MM-DD). Provide a date string (e.g., "2024-12-31") to set or update the reminder. Provide null to clear an existing reminder. If omitted entirely, the existing reminder remains unchanged. Use reminders to track follow-up dates for goals, agreements, or actions related to this journal entry.

Responses
200
bodystringrequired

Journal entry content in HTML format. The content is automatically converted from the internal document format (IDoc) to HTML for easy display in web applications. Contains the rich text content including headings, paragraphs, lists, links, and formatting as originally provided.

createdAtstringrequired

ISO 8601 timestamp indicating when this journal entry was created. Format: YYYY-MM-DDTHH:mm:ssZ (e.g., "2024-01-15T10:30:00Z").

createdBystringrequired

UUID of the user who created this journal entry. This identifies who wrote the entry, which is useful for tracking authorship and accountability.

employeeIdstringrequired

UUID of the employee this journal entry is associated with. This identifies which employee the entry is about.

idstringrequired

Unique identifier (UUID) for this journal entry

lastUpdatedstringrequired

ISO 8601 timestamp indicating when this journal entry was last modified. Format: YYYY-MM-DDTHH:mm:ssZ (e.g., "2024-01-16T14:20:00Z"). This is automatically updated whenever the entry is edited via the PATCH endpoint.

moodstringrequired

Emotional indicator for the journal entry. Values: Happy (positive interaction), Neutral (standard/neutral interaction), or Sad (negative or concerning interaction). This helps categorize and filter entries by emotional context.

Allowed:SadNeutralHappy
reminderobject | nullrequired

Optional reminder date in ISO 8601 format (YYYY-MM-DD). Set when creating or updating the entry to track follow-up dates for goals, agreements, or actions. Returns null if no reminder is set. Example: "2024-12-31" for December 31, 2024.

400

Validation errors or employee not accessible

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://leadtime.app/api/public/employees/journal/string" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "<h1>Updated Employee Status</h1><p>Follow-up meeting scheduled for next week.</p>",
  "employeeId": "550e8400-e29b-41d4-a716-446655440000",
  "mood": "Happy",
  "reminder": "2024-12-31"
}'
Response
{
  "body": "<h1>Employee Update</h1><p>Had a productive meeting today. Discussed project timeline and next steps.</p>",
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "employeeId": "550e8400-e29b-41d4-a716-446655440000",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "lastUpdated": "2024-01-16T14:20:00Z",
  "mood": "Neutral",
  "reminder": "2024-12-31"
}