Create tasks

View as MarkdownOpen in Claude
Logs the same task on one to 50 websites at once, inside one transaction per website. A website the token cannot reach is skipped, not failed - reported under `meta.skipped` with `reason_code: PERMISSION_DENIED`; a task needs no connected website, so nothing else is skippable. Body parameters: - `sites` (integer array, required): exact website ids, 1 to 50. - `title` (string, required): max 255 characters. - `date` (string, required): `Y-m-d`, the calendar day the work happened. - `content` (string, optional): HTML, purified server-side, max 2500 characters after tags are stripped. - `time_spent` (number, optional): minutes spent, decimal allowed, minimum 0. Only ever a value the user gave - never estimate or invent it. - `is_pending` (boolean, optional): defaults to `false` when omitted. - `files` (array, optional): up to 4 entries, `[{uuid, name}]`. `uuid` must name a file already uploaded through the "Uploads" folder (or, on this create, that is the only source - there is no existing task yet); `name` is an optional display name, max 255 characters. Answers **201** with the created `site-tasks` documents (one per website that was not skipped) and `meta.skipped`, or **200** with an empty `data` when every website was skipped. The answer carries no `files` include: read the task again (`Show task`) to see its attachments. The uploaded files are moved onto the **first** created task only; every other task receives its own copy a few seconds later, asynchronously - a failed copy move is reported in `meta.warnings`, never fails the call. - **422**: `sites` missing, empty, over 50 ids, or containing an id that resolves to no row; `title` or `date` missing; an unknown or foreign `files.*.uuid`. - **403**: a read-only token. - **404**: the member lacks the `site-tasks.store` permission.

Authentication

AuthorizationBearer

Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

Request

This endpoint expects an object.
contentstringOptional
datestringOptional
fileslist of objectsOptional
is_pendingbooleanOptional
siteslist of doublesOptional
time_spentdoubleOptional
titlestringOptional

Response

200 OK - every website was skipped

datalist of anyOptional
jsonapiobjectOptional
metaobjectOptional