Upsert a task
Creates or updates a single task in one call. Omit id to create a new task; pass the id of an existing task to update it. Responds 201 on create and 200 on update, with the full saved task as the body. The task's creator is always the API key's user; it cannot be set.
On create, name, status, and due_datetime are required. On update every field is optional: this is a sparse update, so only the fields you send are changed and any field you omit keeps its stored value. Sending a nullable optional field (description, color, owner_id, location_id) as null clears it; sending a required field as null is rejected with a 400.
Linking to another entity: set exactly one of order_id, invoice_id, purchase_id, contact_id, product_id, batch_id, assembly_id, return_id, or company_id. Sending more than one is a 400. The linked entity must exist in your company. The link is set-once: once a task is linked, the link cannot be changed or removed, and sending any relation field for an already-linked task is a 400. The linked entity is returned as the matching relation field in the response.
Required permission: tasks_permissions_create to create, tasks_permissions_edit to update.
Request body
Response
The updated task
Changes
No recorded changes to this endpoint across all 1 revision of this API.