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

# Web Task - Start

> Start a Web Task. The task runs asynchronously; poll the result endpoint for status and output.



## OpenAPI

````yaml post /{workspaceId}/web-tasks/start
openapi: 3.1.0
info:
  title: Intuned Client
  version: 0.0.2
  description: Programmatically trigger automations, manage Jobs, and handle AuthSessions.
  termsOfService: https://intuned.ai/terms
  contact:
    email: founders@intunedhq.com
servers:
  - url: https://app.intuned.io/api/v1/workspace
    description: Base URL for Intuned API.
security:
  - api_key: []
tags:
  - name: projects.jobs
    description: Project Jobs API
  - name: projects.jobs.runs
    description: Project JobRuns API
  - name: projects.runs
    description: Run APIs
  - name: projects.authSessions
    description: Manage AuthSessions
  - name: projects.authSessions.validate
    description: Validate AuthSession
  - name: projects.authSessions.create
    description: Create AuthSession
  - name: projects.authSessions.update
    description: Update AuthSession
  - name: webTasks
    description: Web Tasks API
externalDocs:
  description: Find out more about Intuned
  url: https://intunedhq.com/docs/
paths:
  /{workspaceId}/web-tasks/start:
    post:
      tags:
        - webTasks
      summary: Web Task - Start
      description: >-
        Start a Web Task. The task runs asynchronously; poll the result endpoint
        for status and output.
      operationId: webTaskStart
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: >-
            Your workspace ID. [How to find
            it](https://intunedhq.com/docs/main/03-how-to/manage/manage-workspace#how-to-get-your-workspace-id)?
          example: 123e4567-e89b-12d3-a456-426614174000
          in: path
          name: workspaceId
          x-speakeasy-globals-hidden: true
      requestBody:
        description: Web Task input schema
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                task:
                  type: string
                  description: Natural-language description of what to do.
                  example: Scrape YC companies from batch S24
                startUrl:
                  type: string
                  format: uri
                  description: URL the agent should start from.
                  example: https://www.ycombinator.com/companies
                parameters:
                  type: object
                  additionalProperties: true
                  description: Free-form parameters substituted into the task at runtime.
                  example:
                    param1: value1
                    param2: 42
                    param3: true
                outputSchema:
                  type: object
                  description: >-
                    JSON Schema describing the expected output shape. Accepts
                    any JSON-Schema-shaped object, including draft-2020-12 with
                    `$defs` / `$ref`.
                  additionalProperties: true
                  x-intuned-schema-input: true
                reuseKey:
                  type: string
                  description: >-
                    Caller-provided key that ties this task to a persisted code
                    and resources tree. 
                model:
                  type: string
                  enum:
                    - haiku
                    - sonnet
                    - opus
                  description: >-
                    Anthropic model the agent should run with. Defaults to
                    'haiku' when omitted.
                  example: sonnet
              required:
                - task
              description: >-
                Request body for POST /web-tasks/start. Stored verbatim in
                web_task.input.
              title: Web Task Start API Input
              example:
                task: Scrape YC companies from batch S24
                startUrl: https://www.ycombinator.com/companies
                parameters:
                  batch: S24
                reuseKey: yc_companies
            example:
              task: Scrape YC companies from batch S24
              startUrl: https://www.ycombinator.com/companies
              parameters:
                batch: S24
              reuseKey: yc_companies
      responses:
        '200':
          description: Web task accepted and queued for execution.
          content:
            application/json:
              schema:
                type: object
                properties:
                  webTaskId:
                    type: string
                    description: Unique web task id, prefixed nanoid (wt_...).
                    example: wt_123
                  status:
                    type: string
                    enum:
                      - pending
                required:
                  - webTaskId
                  - status
                title: Web Task Start API Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad-request
                    description: The request is invalid or malformed
                    externalDocs:
                      description: Find more info here
                      url: >-
                        https://intunedhq.com/docs/main/support/errors#bad-request
                  category:
                    type: string
                    enum:
                      - user
                    description: Errors caused by user actions or input
                    externalDocs:
                      description: Find more info here
                      url: https://intunedhq.com/docs/main/support/errors#user
                  message:
                    type: string
                  retirable:
                    type: boolean
                    enum:
                      - false
                  details: {}
                  correlationId:
                    type: string
                required:
                  - code
                  - category
                  - message
                  - retirable
                  - correlationId
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    description: The request requires user authentication
                    externalDocs:
                      description: Find more info here
                      url: >-
                        https://intunedhq.com/docs/main/support/errors#unauthorized
                  category:
                    type: string
                    enum:
                      - user
                    description: Errors caused by user actions or input
                    externalDocs:
                      description: Find more info here
                      url: https://intunedhq.com/docs/main/support/errors#user
                  message:
                    type: string
                  retirable:
                    type: boolean
                    enum:
                      - false
                  details: {}
                  correlationId:
                    type: string
                required:
                  - code
                  - category
                  - message
                  - retirable
                  - correlationId
      x-codeSamples:
        - lang: typescript
          label: webTaskStart
          source: |
            import { IntunedClient } from "@intuned/client";

            const client = new IntunedClient({
              workspaceId: "123e4567-e89b-12d3-a456-426614174000",
              apiKey: process.env["INTUNED_API_KEY"] ?? "",
            });

            async function run() {
              const result = await client.webTasks.start(
                {
                  task: "Scrape YC companies from batch S24",
                },
            );

              console.log(result);
            }

            run();
        - lang: python
          label: Python (SDK)
          source: |-
            from intuned_client import IntunedClient
            from intuned_client import models
            import os


            with IntunedClient(
                workspace_id="123e4567-e89b-12d3-a456-426614174000",
                api_key=os.getenv("INTUNED_API_KEY", ""),
            ) as client:

                res = client.web_tasks.start(
                    body=models.WebTasksStartRequestBody(
                            task="Scrape YC companies from batch S24",
                            startUrl="https://www.ycombinator.com/companies",
                            parameters={
                                "param1": "value1",
                                "param2": 42,
                                "param3": True,
                            },
                            outputSchema={
                                "key": "value",
                            },
                        ),
                )

                print(res)
components:
  securitySchemes:
    api_key:
      type: apiKey
      description: >-
        API Key used to authenticate your requests. [How to create
        one](/main/03-how-to/manage/manage-api-keys).
      in: header
      name: x-api-key

````