# Update a task

PUT https://api.close.com/api/v1/task/{id}/
Content-Type: application/json

The `assigned_to`, `date` (either a date or a date-time), and `is_complete` fields may be updated on all tasks. If the task type is `lead`, the `text` field may also be modified.

Reference: https://developer.close.com/api/resources/tasks/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /task/{id}/:
    put:
      operationId: update
      summary: Update a task
      description: >-
        The `assigned_to`, `date` (either a date or a date-time), and
        `is_complete` fields may be updated on all tasks. If the task type is
        `lead`, the `text` field may also be modified.
      tags:
        - subpackage_tasks
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: _fields
          in: query
          description: Comma-separated list of fields to include in the response.
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tasks_update_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNotification'
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    UpdateNotificationDate:
      oneOf:
        - type: string
          format: date-time
        - type: string
          format: date
      title: UpdateNotificationDate
    UpdateNotificationDueDate:
      oneOf:
        - type: string
          format: date-time
        - type: string
          format: date
      title: UpdateNotificationDueDate
    TaskPriority:
      type: string
      enum:
        - high
        - medium
      title: TaskPriority
    NotificationResolution:
      type: string
      enum:
        - abandoned
        - skipped
      title: NotificationResolution
    UpdateNotification:
      type: object
      properties:
        agent_config_id:
          type:
            - string
            - 'null'
        assigned_to:
          type: string
        contact_id:
          type:
            - string
            - 'null'
        created_by:
          type: string
        date:
          $ref: '#/components/schemas/UpdateNotificationDate'
        due_date:
          $ref: '#/components/schemas/UpdateNotificationDueDate'
        is_complete:
          type: boolean
        is_dateless:
          type: boolean
        lead_id:
          type: string
        organization_id:
          type: string
        priority:
          $ref: '#/components/schemas/TaskPriority'
        resolution:
          oneOf:
            - $ref: '#/components/schemas/NotificationResolution'
            - type: 'null'
        text:
          type: string
      title: UpdateNotification
    tasks_update_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: tasks_update_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```