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

# Update a subtask

> Updates a specified subtask of a specified task.



## OpenAPI

````yaml /openapi.json put /tasks/{taskId}/subtasks/{id}
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /tasks/{taskId}/subtasks/{id}:
    put:
      tags:
        - Tasks
      summary: Update a subtask
      description: Updates a specified subtask of a specified task.
      operationId: UpdateSubTask
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SubTaskDto'
              description: Data transfer object for a subtask.
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SubTaskDto'
              description: Data transfer object for a subtask.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SubTaskDto'
              description: Data transfer object for a subtask.
      responses:
        '202':
          description: >-
            When request is accepted. Returns a hypermedia 'Link' object of the
            subtask to be updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            When subtask with specified id is not associated with authenticated
            client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When subtask with specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    SubTaskDto:
      required:
        - staffId
        - subject
      type: object
      properties:
        staffId:
          minLength: 1
          type: string
          description: >-
            Unique identifier of the associated staff member creating or
            updating the subtask.
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        completedByStaffId:
          type: string
          description: >-
            Unique identifier of the associated staff member who completed the
            subtask.
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        subject:
          minLength: 1
          type: string
          description: Subject of the subtask.
          example: Confer with Mary
        isCompleted:
          type: boolean
          description: True when the subtask is completed.
          example: false
        completedDate:
          type: string
          description: "**Deprecated.** Use `CompletedDateOnly` instead.\n\nCompleted date of the subtask in UTC.\r\nIf not provided and IsCompleted is set to true, the current date will be used."
          format: date-time
          nullable: true
          example: '2020-02-15T13:00:00Z'
          deprecated: true
        completedDateOnly:
          type: string
          description: "Completed date of the subtask. Takes precendence over CompletedDate if set.\r\nIf not provided and IsCompleted is set to true, the current date will be used.\n\nAny time/timezone information will be discarded\nand only the date portion will be considered."
          format: date-time
          nullable: true
          example: '2020-02-15'
      additionalProperties: false
      description: Data transfer object for a subtask.
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````