{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildertrend/json-schema/buildertrend-task-create-request-schema.json",
  "title": "TaskCreateRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildertrend-openapi.yml#/components/schemas/TaskCreateRequest",
  "type": "object",
  "required": [
    "title",
    "jobId"
  ],
  "properties": {
    "title": {
      "type": "string",
      "maxLength": 255
    },
    "jobId": {
      "type": "string",
      "format": "uuid",
      "description": "The job's ID, as `GET /api/v1/jobs` lists it."
    },
    "taskType": {
      "type": "string",
      "enum": [
        "Task",
        "PunchList",
        "ScheduleItem"
      ],
      "description": "Case-sensitive. Defaults to `Task`."
    },
    "status": {
      "type": "string",
      "enum": [
        "NotStarted",
        "Completed"
      ],
      "description": "Case-sensitive. Defaults to `NotStarted`."
    },
    "startDate": {
      "type": "string",
      "format": "date",
      "description": "Set with `endDate` for a date range."
    },
    "startTime": {
      "type": "string",
      "description": "`HH:mm:ss`, the builder's local time. Needs `startDate`, `endDate` and `endTime`."
    },
    "endDate": {
      "type": "string",
      "format": "date",
      "description": "The due date. Required when any other date or time is set."
    },
    "endTime": {
      "type": "string",
      "description": "`HH:mm:ss`, the builder's local time. Needs `endDate`."
    },
    "parentTaskId": {
      "type": "string",
      "format": "uuid",
      "description": "The parent task's `id`, to create a subtask. It must be a top-level task on the same job. Leave it out for a top-level task."
    },
    "assignedToIds": {
      "type": "array",
      "description": "Users to assign, by the `id` `GET /api/v1/jobs/{jobId}/users` lists. Each one must be on that list.",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    }
  }
}