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

# Start New Task

> Starts a new security task with a natural-language instruction against the specified target. The task runs asynchronously.



## OpenAPI

````yaml /openapi.json post /v1/tasks/run
openapi: 3.1.0
info:
  title: MindFort API
  version: 1.0.0
  description: >-
    The MindFort Public API allows you to programmatically trigger assessments
    and tasks, browse targets and findings, and manage finding triage state.
    Authenticate using a Bearer API key generated from the MindFort dashboard.
servers:
  - url: https://api.mindfort.app
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/tasks/run:
    post:
      tags:
        - Tasks
      summary: Start New Task
      description: >-
        Starts a new security task with a natural-language instruction against
        the specified target. The task runs asynchronously.
      operationId: startNewTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartTaskRequest'
      responses:
        '200':
          description: Task started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '201':
          description: Task started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '202':
          description: Task start accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Target not found or does not belong to this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    StartTaskRequest:
      type: object
      required:
        - message
        - target_id
      properties:
        message:
          type: string
          description: Natural-language instruction describing the security task to perform
        target_id:
          type: string
          format: uuid
          description: UUID of the target to run the task against
        target_credential_id:
          type: string
          format: uuid
          description: UUID of stored credentials to use for authenticated testing
        task_model:
          type: string
          enum:
            - MF1_FAST
            - MF1_SMART
          default: MF1_FAST
          description: >-
            Model to use for the task. `MF1_FAST` is optimized for speed,
            `MF1_SMART` for depth.
    TaskResponse:
      type: object
      properties:
        task_id:
          type: string
          description: Scoped task ID in the form org_id::task_uuid
        status:
          type: string
          description: Current status of the task
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        request_id:
          type: string
          description: Unique request identifier for debugging
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key generated from the MindFort dashboard. Pass as `Authorization:
        Bearer <your-api-key>`.

````