Skip to main content

Create entry

This endpoint creates a new journal entry for a given date.

HTTP Request

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

Body Parameters

ParameterDescription
date_onISO-8601 formatted date (required)
nameThe name for the entry (optional, usually left empty, and the app will fill it in with the given date, for example, "Tuesday, July 1st")
contentThe content of the entry (formatted in Markdown)

Example in Ruby

require 'rest-client'

access_token = 'xxx'

RestClient.post(
'https://api.lunatask.app/v1/journal_entries',
{
date_on: '2021-01-10',
content: 'Today was a tough day, but on the other side...'
}.to_json,
{
Authorization: "bearer #{access_token}",
"Content-Type": 'application/json'
}
)

Response

The above command returns JSON structured like this:

{
"journal_entry": {
"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",
}
}