> ## 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 - Result

> Get the status and result of a Web Task. The response is a discriminated union on `status`; the `completed` branch carries an `outcome` plus outcome-specific fields.



## OpenAPI

````yaml get /{workspaceId}/web-tasks/{webTaskId}/result
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/{webTaskId}/result:
    get:
      tags:
        - webTasks
      summary: Web Task - Result
      description: >-
        Get the status and result of a Web Task. The response is a discriminated
        union on `status`; the `completed` branch carries an `outcome` plus
        outcome-specific fields.
      operationId: webTaskResult
      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
        - schema:
            type: string
          required: true
          description: Web Task ID. Returned from the start endpoint as `webTaskId`.
          example: wt_123
          in: path
          name: webTaskId
      responses:
        '200':
          description: Web task status and (when terminal) result envelope.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      webTaskId:
                        type: string
                        description: Unique web task id, prefixed nanoid (wt_...).
                        example: wt_123
                      status:
                        type: string
                        enum:
                          - pending
                      createdAt:
                        type: string
                        format: date-time
                    required:
                      - webTaskId
                      - status
                      - createdAt
                  - type: object
                    properties:
                      webTaskId:
                        type: string
                        description: Unique web task id, prefixed nanoid (wt_...).
                        example: wt_123
                      status:
                        type: string
                        enum:
                          - started
                      createdAt:
                        type: string
                        format: date-time
                      startedAt:
                        type: string
                        format: date-time
                    required:
                      - webTaskId
                      - status
                      - createdAt
                      - startedAt
                  - type: object
                    properties:
                      webTaskId:
                        type: string
                        description: Unique web task id, prefixed nanoid (wt_...).
                        example: wt_123
                      status:
                        type: string
                        enum:
                          - completed
                      outcome:
                        type: string
                        enum:
                          - success
                          - failed
                        description: >-
                          Public-facing outcome (lowercase). Present only when
                          status='completed'.
                        example: success
                      createdAt:
                        type: string
                        format: date-time
                      startedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      completedAt:
                        type: string
                        format: date-time
                      reuse:
                        type: object
                        properties:
                          key:
                            type: string
                          used:
                            type: boolean
                          created:
                            type: boolean
                          updated:
                            type: boolean
                          revision_id:
                            type: string
                          revision_timestamp:
                            type: string
                            format: date-time
                        required:
                          - key
                          - used
                          - updated
                          - revision_id
                          - revision_timestamp
                        description: >-
                          Per-execution snapshot of reuse-key state. Records the
                          web_task that produced the resource revision observed
                          by this run, plus whether this run created or updated
                          the resource.
                      cost:
                        type: object
                        properties:
                          aiUsd:
                            type: number
                            minimum: 0
                            description: AI spend for this task in USD.
                            example: 0.42
                        description: >-
                          Public-facing cost summary returned only on completed
                          web tasks.
                        title: Web Task API Cost
                      result:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - inline
                              data:
                                description: >-
                                  Inline result body. Free-form JSON; conforms
                                  to the input.outputSchema when provided.
                            required:
                              - type
                            description: >-
                              Inline result envelope — small payload returned
                              directly.
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - file
                              file:
                                type: object
                                properties:
                                  url:
                                    type: string
                                    format: uri
                                    description: Signed URL to download the result blob.
                                  contentType:
                                    type: string
                                    description: >-
                                      MIME type of the blob (e.g.
                                      application/json).
                                    example: application/json
                                  sizeBytes:
                                    type: integer
                                    minimum: 0
                                    description: Size of the blob in bytes.
                                  expiresAt:
                                    type: string
                                    format: date-time
                                    description: Expiry of the signed URL (ISO-8601).
                                required:
                                  - url
                                  - contentType
                                  - sizeBytes
                                  - expiresAt
                            required:
                              - type
                              - file
                            description: >-
                              File result envelope — large payload offloaded to
                              object storage and delivered via a signed URL.
                        description: >-
                          Public result envelope returned on completed+success.
                          Discriminated by `type`: 'inline' carries `data`,
                          'file' carries a signed-URL `file` block.
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - workspace-rate-limited
                              - unauthenticated
                              - no-ai-credits-left
                              - internal-error
                              - timeout
                              - rejected
                          message:
                            type: string
                          details: {}
                        required:
                          - code
                          - message
                        description: Error info recorded for a FAILED web task.
                    required:
                      - webTaskId
                      - status
                      - outcome
                      - createdAt
                      - startedAt
                      - completedAt
                      - cost
                  - type: object
                    properties:
                      webTaskId:
                        type: string
                        description: Unique web task id, prefixed nanoid (wt_...).
                        example: wt_123
                      status:
                        type: string
                        enum:
                          - canceled
                      createdAt:
                        type: string
                        format: date-time
                      startedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      completedAt:
                        type: string
                        format: date-time
                    required:
                      - webTaskId
                      - status
                      - createdAt
                      - startedAt
                      - completedAt
                description: >-
                  Polled status + result envelope for GET
                  /web-tasks/result/{webTaskId}. Discriminated by status; the
                  'completed' branch carries outcome plus outcome-specific
                  fields (result/resultUrl on success, error on failure).
                title: Web Task Result API Response
              examples:
                pending:
                  value:
                    webTaskId: wt_123
                    status: pending
                    createdAt: '2026-05-19T12:00:00.000Z'
                started:
                  value:
                    webTaskId: wt_123
                    status: started
                    createdAt: '2026-05-19T12:00:00.000Z'
                    startedAt: '2026-05-19T12:00:05.000Z'
                completedSuccessInline:
                  value:
                    webTaskId: wt_123
                    status: completed
                    outcome: success
                    createdAt: '2026-05-19T12:00:00.000Z'
                    startedAt: '2026-05-19T12:00:05.000Z'
                    completedAt: '2026-05-19T12:01:00.000Z'
                    cost:
                      aiUsd: 0.42
                    result:
                      type: inline
                      data:
                        companies:
                          - name: Acme
                completedFailed:
                  value:
                    webTaskId: wt_123
                    status: completed
                    outcome: failed
                    createdAt: '2026-05-19T12:00:00.000Z'
                    startedAt: '2026-05-19T12:00:05.000Z'
                    completedAt: '2026-05-19T12:01:00.000Z'
                    cost:
                      aiUsd: 0.05
                    error:
                      code: internal-error
                      message: Agent crashed before producing a result.
                canceled:
                  value:
                    webTaskId: wt_123
                    status: canceled
                    createdAt: '2026-05-19T12:00:00.000Z'
                    startedAt: '2026-05-19T12:00:05.000Z'
                    completedAt: '2026-05-19T12:00:30.000Z'
        '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
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not-found
                    description: The requested resource was not found
                    externalDocs:
                      description: Find more info here
                      url: https://intunedhq.com/docs/main/support/errors#not-found
                  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: webTaskResult
          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.result("wt_123");

              console.log(result);
            }

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


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

                res = client.web_tasks.result(
                    web_task_id="wt_123",
                )

                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

````