> ## 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
  - name: agent
    description: Autonomous Intuned Agent sessions
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: >-
                    Schema describing the expected output shape. Accepts
                    JSON-Schema-shaped objects as well as Intuned's extended
                    type vocabulary (e.g. `{ type: 'attachment' }`).
                  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
                proxy:
                  type: string
                  format: uri
                  description: Proxy URL to use for all browser traffic in this task.
                  example: http://my-proxy.com:8080
                auth:
                  type: string
                  description: >-
                    Id of a captured web task auth (recorder-based session).
                    When set, the agent's browser is pre-loaded with that
                    session's storage state so the task runs authenticated.
                  example: wta_123
                sink:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - s3
                        bucket:
                          type: string
                          description: >-
                            The name of the S3 bucket where the data will be
                            stored.
                          example: my-s3-bucket
                        accessKeyId:
                          type: string
                          description: The access key ID for the S3 bucket.
                          example: AKIAIOSFODNN7EXSSPLE
                        secretAccessKey:
                          type: string
                          description: The secret access key for the S3 bucket.
                          example: wJalrXUtnFFFI/K7MDENG/bPxRfiCYEXAMPLEKEY
                        region:
                          type: string
                          description: The region where the S3 bucket is located.
                          example: us-west-2
                        prefix:
                          type: string
                          description: >-
                            Optional prefix for the S3 objects. This can be used
                            to organize objects within the bucket.
                          example: my-prefix/
                        skipOnFail:
                          type: boolean
                          default: false
                          description: >-
                            If enabled, failed payload runs will ***not*** be
                            written to the bucket.
                        apisToSend:
                          type: array
                          items:
                            type: string
                          minItems: 1
                          description: >-
                            List of API names to be sent to the S3 bucket. If
                            not provided, all APIs will be sent.
                          example:
                            - api1
                            - api2
                        endpoint:
                          type: string
                          description: >-
                            Optional custom endpoint for the S3 bucket. This can
                            be used for S3-compatible services.
                          example: https://s3.custom-endpoint.com
                        forcePathStyle:
                          type: boolean
                          description: >-
                            If true, the S3 client will use path-style URLs
                            instead of virtual-hosted-style URLs. This is useful
                            for S3-compatible services that require path-style
                            access.
                          example: true
                      required:
                        - type
                        - bucket
                        - accessKeyId
                        - secretAccessKey
                        - region
                      description: Configuration for the S3 sink.
                      title: S3 Sink Configuration
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - webhook
                        url:
                          type: string
                          description: The URL to which the webhook will send the data.
                          example: https://example.com/webhook
                        headers:
                          type: object
                          additionalProperties:
                            type: string
                          description: >-
                            Optional headers to be sent with the webhook
                            request.
                          example:
                            Content-Type: application/json
                            Authorization: Bearer token
                        skipOnFail:
                          type: boolean
                          default: false
                          description: >-
                            If true, the webhook will not be sent if the API
                            execution fails.
                        apisToSend:
                          type: array
                          items:
                            type: string
                          minItems: 1
                          description: >-
                            List of API names to be sent to the webhook. If not
                            provided, all APIs will be sent.
                          example:
                            - api1
                            - api2
                      required:
                        - type
                        - url
                      description: Configuration for the webhook sink.
                      title: Webhook Sink Configuration
                  description: >-
                    Optional sink configuration. When set, the web task result
                    is delivered to a webhook or S3 bucket once the task
                    completes. Returned partially obfuscated in the result API
                    response.
              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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.