Parse Composer text
const url = 'https://example.com/api/v1/notes/composer/parse';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"example","now":"example","text":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/notes/composer/parse \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mode": "example", "now": "example", "text": "example" }'Requires a signed-in User with the data scope. It parses one line in Event, Task or Note mode without saving it. It returns 400 for invalid text, time or mode, or 413 when the line is too long. Route: /api/v1/notes/composer/parse. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The composer’s mode: event (a Log entry or an Event), task or
note. It selects the run grammar and the tag namespace.
The client’s local wall time, YYYY-MM-DDTHH:MM[:SS]. Its date is the
reference for relative dates (“tomorrow”); the core ignores the zone.
Line 1 of the composer text. No line breaks.
Examplegenerated
{ "mode": "example", "now": "example", "text": "example"}Responses
Section titled “Responses”object
object
none, medium or high.
object
An explicit or resolved date, YYYY-MM-DD.
object
object
UTF-16 code-unit offset, exclusive.
date, time, duration, priority, recurrence, tag or anchor.
UTF-16 code-unit offset, inclusive.
Present only when mode is task.
object
The recurrence as the Task file stores it (every week).
Examplegenerated
{ "classification": { "confidence": "example", "margin": 1, "mode": "example" }, "entry": { "crosses_midnight": true, "date": "example", "duration_minutes": 1, "end": "example", "mode": "example", "since": "example", "start": "example", "tags": [ "example" ], "title": "example", "until": "example" }, "note": { "tags": [ "example" ], "title": "example" }, "runs": [ { "end": 1, "kind": "example", "start": 1 } ], "task": { "due": "example", "due_time": "example", "priority": "example", "recurrence": "example", "scheduled": "example", "scheduled_time": "example", "start": "example", "start_time": "example", "tags": [ "example" ], "title": "example" }}Malformed text, time or mode
The line is longer than 8 KiB