Create note
This endpoint creates a new note.
HTTP Request
POST https://api.lunatask.app/v1/notes
Body Parameters
| Parameter | Description |
|---|---|
notebook_id | The Notebook ID of the notebook where the note should be created (optional, can be found in our apps in the notebook settings) |
name | The name of the note (optional, but impractical if empty) |
content | The content of the note (optional, but impractical if empty, formatted in Markdown) |
date_on | A date assigned to the note (optional, ISO-8601 formatted) |
source | Identification of external system where the note is coming from (optional, e.g. "evernote") |
source_id | The ID of the record in the external system (optional, e.g. "352fd2d7-cdc0-4e91-a0a3-9d6cc9d440e7") |
When creating a note, given there's already an existing note in the same notebook with the same source/source_id, the endpoint will return 204 No Content without creating a duplicate.
Example in Ruby
require 'rest-client'
access_token = 'xxx'
payload = {
name: 'My new note',
content: 'My important note content',
source: 'evernote',
source_id: '352fd2d7-cdc0-4e91-a0a3-9d6cc9d440e7',
notebook_id: '11b37775-5a34-41bb-b109-f0e5a6084799'
}
RestClient.post('https://api.lunatask.app/v1/notes', payload.to_json, { Authorization: "bearer #{access_token}", "Content-Type": 'application/json' })