Skip to main content

Creating person timeline notes

This endpoint creates a new note for given date on a person's memory timeline in the relationships section of the app.

HTTP Request

POST https://api.lunatask.app/v1/person_timeline_notes

Body Parameters

ParameterDescription
person_idThe Person ID of the person (can be found in in our apps in the person detail or looked up using source/source_id attributes)
date_onISO-8601 formatted date (optional, if not provided today will be used)
contentThe content of the note (optional, but impractical if empty, formatted in Markdown)

Whitespace handling in Markdown

Unfortunately, Markdown treats multiple consecutive blank lines as one blank line. To get around that and to allow a blank line between paragraphs in notes, prepend a backslash and a single space to all consecutive new lines except the first one.

This is the first line.<CR>
\ <CR>
This is the second line.

In this example, the <CR> marker signifies where new line breaks are placed. In most programming languages, the string representation would be "This is the first line.\n\\ \nThis is the second line.".

Example in Ruby

require 'rest-client'

access_token = 'xxx'

payload = {
person_id: '5999b945-b2b1-48c6-aa72-b251b75b3c2e',
date_on: '2021-01-10'
content: 'Today we talked about ...'
}

RestClient.post('https://api.lunatask.app/v1/person_timeline_notes', payload.to_json, { Authorization: "bearer #{access_token}", "Content-Type": 'application/json' })

Response

The above command returns JSON structured like this:

{
"person_timeline_note": {
"id": "6aa0d6e8-3b07-40a2-ae46-1bc272a0f472",
"date_on": "2021-01-10",
"created_at": "2021-01-10T10:39:25Z",
"updated_at": "2021-01-10T10:39:25Z",
}
}