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

# Update task screen time

> Adds a specified duration to the total screen time recorded for a task. This is typically used for tasks involving user interaction.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v2/tasks/{taskId}/update-screen-time
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/tasks/{taskId}/update-screen-time:
    post:
      tags:
        - Task
      summary: Update task screen time
      description: >-
        Adds a specified duration to the total screen time recorded for a task.
        This is typically used for tasks involving user interaction.
      parameters:
        - schema:
            type: string
          in: path
          name: taskId
          required: true
          description: The unique identifier of the task for which to update screen time.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                additionalScreenTime:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  description: >-
                    The additional screen time in milliseconds to add to the
                    task's total.
              required:
                - additionalScreenTime
              additionalProperties: false
        required: true
      responses:
        '204':
          description: Screen time updated successfully. No content returned.
          content:
            application/json:
              schema:
                enum:
                  - 'null'
                nullable: true
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Not Found, the task with the specified ID was not found.
                required:
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Internal server error while updating screen time.
                required:
                  - error
                additionalProperties: false

````