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

# Update Task By Id

> Update a task by ID



## OpenAPI

````yaml self-hosted-api-reference/openapi.json put /api/tasks/{task_id}
openapi: 3.1.0
info:
  title: Webagent API
  description: API to execute automated tasks on browser using different LLM providers.
  version: 0.1.0
servers: []
security: []
paths:
  /api/tasks/{task_id}:
    put:
      summary: Update Task By Id
      description: Update a task by ID
      operationId: update_task_by_id_api_tasks__task_id__put
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: integer
            title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskUpdateRequest:
      properties:
        prompt:
          anyOf:
            - type: string
              minLength: 3
            - type: 'null'
          title: Prompt
          description: The task prompt
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: The model to use
        provider:
          anyOf:
            - $ref: '#/components/schemas/ProviderEnum'
            - type: 'null'
          description: The provider to use
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: Webhook URL for notifications
        response_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Format
          description: Response format (text or json)
        json_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Json Schema
          description: JSON schema for structured output
        cached_workflow:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Cached Workflow
          description: Cached workflow definition
        use_cached_workflow:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Use Cached Workflow
          description: Whether to use cached workflow
      type: object
      title: TaskUpdateRequest
      description: Request model for updating a task
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProviderEnum:
      type: string
      enum:
        - openai
        - deepseek
        - anthropic
        - google
        - groq
        - mistral
        - together
      title: ProviderEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````