Skip to navigation

Create tasks on websites

View as MarkdownOpen in Claude

Logs the same task on each website you list in sites, up to 50. Use it to record work such as “renewed the SSL certificate” on every website it touched. One task is created for each website.

Websites that cannot be processed are reported in meta.skipped, each with a reason_code and a message, and do not fail the call. Only a website your token cannot reach is skipped (PERMISSION_DENIED, with a null site_name), because a task does not need a connected website. When every website was skipped, the answer is 200 with an empty list instead of 201.

Attached files are moved onto the first task created. Every other task receives its own copy a few seconds later. A file that could not be attached is reported in meta.warnings and does not fail the call. The answer does not include the attachments: read a task with “Retrieve a task” and include=files to see them.

Your role must be allowed to create tasks; without it the request answers 404.

Body

  • sites (array of integers, required): ids of the websites to act on, 1 to 50.
  • title (string, required): at most 255 characters.
  • date (string, required): the day the work happened, as YYYY-MM-DD.
  • content (string, optional): what was done, as HTML. It is cleaned on the server and holds at most 2500 characters once tags are stripped.
  • time_spent (number, optional): minutes spent, decimals allowed, 0 or more.
  • is_pending (boolean, optional): false when omitted.
  • files (array, optional): up to 4 entries of {uuid, name}. uuid is the id returned by “Upload a file” (the only source a new task can take files from); name is an optional display name of at most 255 characters.

Errors

  • 422: sites is missing, empty, has more than 50 ids, repeats an id or contains an id that is not a website; title or date is missing; a files.*.uuid is unknown or was not uploaded by you.

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