Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Post a support message

Posts a normal opener-authored message as the acting PAT/OAuth user. The ticket must belong to that acting user. Posting to a closed ticket automatically reopens it.

POST/support/tickets/{ticketId}/messages
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
ticketIdstringrequired
Support ticket UUID.
Request body
requiredapplication/json
messagestringrequired
The next support message as Markdown or HTML. Posting to a closed ticket automatically reopens it. 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 ```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> ``` ### 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> ```
Responses
201Updated ticket with the complete conversation.
createdAtstring<date-time>required
When the ticket was opened.
idstringrequired
Support ticket UUID.
lastMessageAtstring<date-time>required
When the newest message was created.
lastMessageAuthorSidestringrequired
Which side wrote the newest message.
Allowed:UserAdmin
lastMessageTextBodystringrequired
Plain-text preview of the newest message.
messagesSupportMessageDto[]required
Complete conversation ordered from oldest to newest.
Show properties
Array of SupportMessageDto
authorSidestringrequired
Whether the opener or the Leadtime team wrote the message.
Allowed:UserAdmin
authorUserIdobject | nullrequired
The ticket opener user UUID for opener-authored messages. Null for Leadtime team messages.
bodystringrequired
Message body rendered as HTML.
createdAtstring<date-time>required
When the message was created.
idstringrequired
Support message UUID.
manageAuthorobject | nullrequired
Name and avatar of the Leadtime team member for team-authored messages. Never contains an email address.
Show properties
avatarobject | nullrequired
Avatar configuration for the Leadtime team member. Null when no avatar is configured.
Show properties
idstringrequired
Stable avatar configuration identifier.
kindstringrequired
How the support team member avatar is rendered.
Allowed:generateduploadedleadtimeAgent
optionsobject
Generated-avatar rendering options.
stylestring
Generated-avatar style when kind is generated.
Allowed:adventurerbotttsinitialspersonasnotionistsdylanbottts-neutral
namestringrequired
Display name of the Leadtime team member.
textBodystringrequired
Plain-text message body for summaries and search.
statusstringrequired
Current ticket status.
Allowed:OpenClosed
titlestringrequired
Generated ticket title, or the immediate first-message fallback while generation is running.
titleIsGeneratingbooleanrequired
Whether a generated title is still being prepared.
unreadbooleanrequired
Whether the acting opener has an unread message from the Leadtime team.
userLastSeenAtobject<date-time> | nullrequired
When the ticket opener last viewed the conversation.
400The message is empty or invalid.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Ticket not found for the acting user.
Request
curl -X POST "https://leadtime.app/api/public/support/tickets/string/messages" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "message": "<p>I reproduced the issue again at 14:30 UTC. The browser console shows a 403 response.</p>"
}'
Response
{
  "createdAt": "2019-08-24T14:15:22Z",
  "id": "5532b85e-bef7-48c9-9272-9de7c63a1234",
  "lastMessageAt": "2019-08-24T14:15:22Z",
  "lastMessageAuthorSide": "User",
  "lastMessageTextBody": "The project page stays blank after I select it.",
  "messages": [
    {
      "authorSide": "User",
      "authorUserId": "65bc3ac7-d43b-43c9-b3f2-4bd3b46c96bc",
      "body": "<p>The project page stays blank after I select it.</p>",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "81008f98-5921-4acb-936b-62d122d1fcfd",
      "manageAuthor": {
        "avatar": {
          "id": "9c26ca8f-fc9a-40fc-b5e0-ec0aa344f6fd",
          "kind": "generated",
          "options": {},
          "style": "adventurer"
        },
        "name": "Alex Morgan"
      },
      "textBody": "The project page stays blank after I select it."
    }
  ],
  "status": "Open",
  "title": "Project page stays blank",
  "titleIsGenerating": true,
  "unread": true,
  "userLastSeenAt": {}
}