Tasks
Create a task
Creates a task with domain validation: the type, the staff, the project and the related document are checked against your account, and a foreign reference responds 400 without creating anything.
tasks:writeResult
generated from the schema
Returns the created task.
Arguments
Task title. Required.
Limits: min length 1, max length 300
Task description or notes.
Limits: max length 5000
Task start date and time (ISO 8601 with offset). Required.
Task end date and time (ISO 8601 with offset); must be equal to or later than startDate.
Whether the task is all-day. Defaults to false.
Task type: its identifier (system types: default, delivery, return, temporaryStock; custom types: their id, see /api) or its name, matched ignoring case and accents. A name that matches several custom types is rejected with 400 listing their identifiers. The task takes the color of the type. Required.
Limits: min length 1, max length 100
Identifiers of the staff assigned to the task (max 50).
Limits: max 50 items, each min length 1, each max length 100
Identifier of the project the task is linked to.
Limits: min length 1, max length 100
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Unique task identifier.
Task title.
Task description or notes; null if it has none.
Start date and time in ISO 8601 with offset.
End date and time in ISO 8601 with offset; null if it has no defined end.
Whether the task is all-day.
Whether the task is completed.
Whether the task is part of a recurring series.
Identifier of the recurrence group it belongs to; null if it is not recurring.
Recurrence pattern of the task; null if it is not recurring.
Show child attributesHide child attributes
Recurrence frequency: daily, weekly, monthly or yearly.
Available options: daily, weekly, monthly, yearly
Interval between repetitions according to the frequency (e.g. 2 with weekly = every two weeks).
Number of repetitions after which the recurrence ends; null if it does not end by number of occurrences.
Date on which the recurrence ends, in ISO 8601 with offset; null if it does not end by date.
Task type (identifier of the type).
Identifiers of the staff assigned to the task.
Identifier of the linked project; null if the task is not linked.
Appearance of the task in the schedule (color and variant).
Show child attributesHide child attributes
Task color in the schedule (hexadecimal code).
Visual variant of the task: primary, secondary, destructive or default.
Available options: primary, secondary, destructive, default
Creation date in ISO 8601 with offset.
Last update date in ISO 8601 with offset.
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
Sample prompts
Create a task to check the lenses of order 2026-0142 before pickup.
The same operation by REST
This tool runs POST /api/v1/tasks.
Related pages
Link to this section: Related pagesTasks
Create a task
Creates a task with domain validation: the type, the staff, the project and the related document are checked against your account, and a foreign reference responds 400 without creating anything.
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?