Subtasks

Create a dated subtask

Requires at least one of the four date fields (startDate, endDate, actualStartDate, actualEndDate); when both planned dates are set, endDate must be >= startDate. Planned dates need the card to carry both planned dates and must fall inside them — refused with 400 and details.rule CARD_HAS_NO_DATES or SUBTASK_OUT_OF_RANGE, naming the plan and the offending date; actual dates are independent.

post/api/cards/{cardId}/subtasks

Request

  • Base URL: https://tre-app.com
  • URL: https://tre-app.com/api/cards/{cardId}/subtasks
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Opaque 1–200 character key. The same user, endpoint, and key replay the cached response for 24 hours when the request body fingerprint matches. A reused key with a different body answers 422 IDEMPOTENCY_KEY_REUSED; the same key while the original is still in flight answers 409 CONFLICT.

Request body

titlestring required
startDatestring date nullable
endDatestring date nullable
scheduleState'unclassified' | 'planned' | 'suspended' | 'cancelled'

Meaning of the retained schedule; one server rule on every surface. Omit it: a create with a planned date is stored as planned, one without as unclassified; on update, touching a planned date promotes unclassified to planned, clearing both planned dates resets to unclassified, any other stored state is kept. Send suspended or cancelled explicitly; a non-unclassified state with both planned dates null is refused (400 BAD_REQUEST).

actualStartDatestring date nullable

Observed start, explicitly recorded from evidence. Independent of the schedule; null means unknown, never not started.

actualEndDatestring date nullable

Observed end, explicitly recorded from evidence. May fall outside the plan. Null means unknown, never incomplete.

colorstring

Response

Success

idstring uuid required
cardIdstring uuid required
titlestring required
startDatestring date nullable required
endDatestring date nullable required
scheduleState'unclassified' | 'planned' | 'suspended' | 'cancelled' required

Meaning of the retained schedule. Unclassified means its intent has not been reviewed; suspended/cancelled retain the plan for retrospective comparison.

actualStartDatestring date nullable required

Observed start, explicitly recorded from evidence. Independent of the schedule; null means unknown, never not started.

actualEndDatestring date nullable required

Observed end, explicitly recorded from evidence. May fall outside the plan. Null means unknown, never incomplete.

orderinteger required
colorstring required
createdAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.