> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.writesonic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a task

> Create a task in the project.

Purely additive: nothing is overwritten and the task is visible and
deletable in the product.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/tasks
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/tasks:
    post:
      tags:
        - business
      summary: Create a task
      description: |-
        Create a task in the project.

        Purely additive: nothing is overwritten and the task is visible and
        deletable in the product.
      operationId: create_task_api_v1_business_tasks_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskCreate:
      properties:
        title:
          type: string
          maxLength: 500
          minLength: 1
          title: Title
          description: Task title.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Task body/details.
        status:
          $ref: '#/components/schemas/TaskStatus'
          description: Initial task status.
          default: backlog
        priority:
          $ref: '#/components/schemas/TaskPriority'
          description: Task priority.
          default: none
        assignee_type:
          $ref: '#/components/schemas/ActorType'
          description: Whether the assignee is a human user or an agent.
          default: system
        assignee_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Id
          description: >-
            Required unless assignee_type is system - the user id for human, or
            the agent's UUID (as a string) for ai_agent.
        parent_task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Task Id
          description: Parent task, to create this as a subtask.
        page_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Page Id
          description: Content-intelligence page this task relates to, if any.
        source:
          $ref: '#/components/schemas/TaskSource'
          description: Source of the task.
          default: user
        due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Due Date
          description: Due date for the task.
        label_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Label Ids
          description: Labels to attach to the task.
        settings_override:
          additionalProperties: true
          propertyNames:
            $ref: '#/components/schemas/SettingName'
          type: object
          title: Settings Override
          description: >-
            Per-task overrides of project-level agent settings. Value per key:
            for skip_review, one of ReviewMode (require_review, auto_approve,
            defer) - not a bool; for gated_tools/gated_capabilities, a dict of
            tool/capability NAME (not id) -> bool - keys are resolved by name
            against active tool/capability rows.
        attachments:
          items:
            $ref: '#/components/schemas/PendingAttachment'
          type: array
          title: Attachments
          description: Files to attach to the task on creation.
      type: object
      required:
        - title
      title: TaskCreate
    TaskResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        identifier:
          type: string
          title: Identifier
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        creator_type:
          $ref: '#/components/schemas/ActorType'
        creator_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Id
        assignee_type:
          $ref: '#/components/schemas/ActorType'
        assignee_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Id
        parent_task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Task Id
        page_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Page Id
        schedule_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Schedule Id
        due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Due Date
        sort_order:
          type: number
          title: Sort Order
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        comment_count:
          type: integer
          title: Comment Count
        last_comment_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Comment At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - identifier
        - title
        - description
        - status
        - priority
        - creator_type
        - creator_id
        - assignee_type
        - assignee_id
        - parent_task_id
        - page_id
        - schedule_id
        - due_date
        - sort_order
        - started_at
        - completed_at
        - comment_count
        - last_comment_at
        - created_at
        - updated_at
      title: TaskResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskStatus:
      type: string
      enum:
        - backlog
        - todo
        - in_progress
        - pending_human_approval
        - in_review
        - done
        - cancelled
      title: TaskStatus
    TaskPriority:
      type: string
      enum:
        - urgent
        - high
        - medium
        - low
        - none
      title: TaskPriority
    ActorType:
      type: string
      enum:
        - human
        - ai_agent
        - system
      title: ActorType
    TaskSource:
      type: string
      enum:
        - user
        - agent
        - content_intelligence
      title: TaskSource
    PendingAttachment:
      properties:
        attachment_id:
          type: string
          format: uuid
          title: Attachment Id
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          title: Content Type
      type: object
      required:
        - attachment_id
        - filename
        - content_type
      title: PendingAttachment
      description: |-
        References a file already uploaded via the project upload-url, to be
        linked to a task or comment at creation time.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````