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

> Updates a specified task.



## OpenAPI

````yaml /openapi.json put /tasks/{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/{id}:
    put:
      tags:
        - Tasks
      summary: Update a task
      description: Updates a specified task.
      operationId: UpdateTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TaskDto'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TaskDto'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TaskDto'
      responses:
        '202':
          description: >-
            When request is accepted. Returns a hypermedia 'Link' object of the
            task 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 task with specified id is not associated with authenticated
            client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When task with specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    TaskDto:
      required:
        - staffId
      type: object
      properties:
        matterId:
          type: string
          description: Unique identifier of the matter associated to the task.
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        staffId:
          minLength: 1
          type: string
          description: >-
            Unique identifier of the associated staff member creating or
            updating the task.
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        completedByStaffId:
          type: string
          description: >-
            Unique identifier of the associated staff member completing the
            task.
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        assigneeIds:
          type: array
          items:
            type: string
          description: >-
            Unique identifier(s) of the associated staff member(s) assigned to
            the task.
          nullable: true
        subject:
          type: string
          description: The subject - this should be a short description of the task.
          nullable: true
          example: Review contract for John Smith
        note:
          type: string
          description: Notes on the task.
          nullable: true
          example: Contract needs to be reviewed and discussed with John
        isCompleted:
          type: boolean
          description: True when the task is completed.
          example: false
        categories:
          type: array
          items:
            type: string
          description: Categories for the task.
          nullable: true
        completedDate:
          type: string
          description: "**Deprecated.** Use `CompletedDateOnly` instead.\n\nCompleted date of the task 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 task. 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'
        dueDate:
          type: string
          description: |-
            **Deprecated.** Use `DueDateOnly` instead.

            Due date of the task in UTC.
          format: date-time
          nullable: true
          example: '2020-02-15T13:00:00Z'
          deprecated: true
        dueDateOnly:
          type: string
          description: |-
            Due date of the task. Takes precendence over DueDate if set.

            Any time/timezone information will be discarded
            and only the date portion will be considered.
          format: date-time
          nullable: true
          example: '2020-02-15'
        duration:
          type: string
          description: Duration of the task in ISO 8601 duration format.
          nullable: true
          example: PT4H33M
      additionalProperties: false
    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

````