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

# Update a task

> Update an existing task



## OpenAPI

````yaml /api-reference/openapi.yaml patch /v1/tasks/{id}
openapi: 3.0.1
info:
  title: Slant Public API V1
  version: v1
  description: Public API for creating and managing resources in Slant
  contact:
    name: Slant API Support
    email: api@slant.com
servers:
  - url: https://api.slant.app
security:
  - bearer: []
paths:
  /v1/tasks/{id}:
    patch:
      tags:
        - Tasks
      summary: Update a task
      description: Update an existing task
      parameters:
        - name: id
          in: path
          description: The task ID
          required: true
          example: 123e4567-e89b-12d3-a456-426614174000
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >-
            Unique key to ensure idempotent request handling. If a request with
            the same key was already processed, the original response will be
            returned.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Task title
                  example: Updated task title
                description:
                  type: string
                  description: Task description
                deadline_at:
                  type: string
                  format: date-time
                  description: Deadline for the task
                all_day:
                  type: boolean
                  description: Whether this is an all-day task
                status:
                  type: string
                  enum:
                    - todo
                    - done
                  description: Task status
                priority:
                  type: string
                  enum:
                    - low_priority
                    - medium_priority
                    - high_priority
                    - urgent_priority
                  description: Task priority
                is_private:
                  type: boolean
                  description: >-
                    When true, only the creator, assignee (or members of the
                    assigned team), and collaborators can see this task.
                household_id:
                  type: string
                  description: Associate task with a household
                contact_id:
                  type: string
                  description: Associate task with a contact
                business_id:
                  type: string
                  description: Associate task with a business
                assigned_to_id:
                  type: string
                  description: >-
                    User ID from the relevant book users list to assign the task
                    to
                assigned_team_id:
                  type: string
                  description: >-
                    Team ID to assign the task to (mutually exclusive with
                    assigned_to_id)
                tag_ids:
                  type: array
                  items:
                    type: string
                  description: Label IDs to replace the task labels with
        required: true
      responses:
        '200':
          description: task updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          description: bad request - invalid JSON
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - detail
                properties:
                  error:
                    type: string
                    description: Error code
                    enum:
                      - invalid_json
                  detail:
                    oneOf:
                      - type: string
                        description: Human-readable error description
                      - type: array
                        items:
                          type: string
                        description: Array of validation error messages
        '401':
          description: unauthorized - missing or invalid token
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - detail
                properties:
                  error:
                    type: string
                    description: Error code
                    enum:
                      - token_missing
                      - token_invalid
                  detail:
                    oneOf:
                      - type: string
                        description: Human-readable error description
                      - type: array
                        items:
                          type: string
                        description: Array of validation error messages
        '403':
          description: forbidden
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - detail
                properties:
                  error:
                    type: string
                    description: Error code
                    enum:
                      - record_not_found
                  detail:
                    oneOf:
                      - type: string
                        description: Human-readable error description
                      - type: array
                        items:
                          type: string
                        description: Array of validation error messages
      security:
        - bearer: []
components:
  schemas:
    Task:
      type: object
      required:
        - id
        - title
        - status
        - all_day
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: The task ID
          example: abc123xyz
        title:
          type: string
          description: Task title
          example: Follow up with client
        description:
          type: string
          nullable: true
          description: Task description
        deadline_at:
          type: string
          format: date-time
          nullable: true
          description: Deadline for the task
        all_day:
          type: boolean
          description: Whether this is an all-day task
        status:
          type: string
          enum:
            - todo
            - done
          description: Task status
        priority:
          type: string
          enum:
            - low_priority
            - medium_priority
            - high_priority
            - urgent_priority
          nullable: true
          description: Task priority
        is_private:
          type: boolean
          description: >-
            When true, only the creator, assignee (or members of the assigned
            team), and collaborators can see this task. Use for sensitive tasks
            like HR or payroll.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the task was completed
        created_at:
          type: string
          format: date-time
          description: When the task was created
        updated_at:
          type: string
          format: date-time
          description: When the task was last updated
        assigned_to:
          type: object
          nullable: true
          properties:
            id:
              type: string
              description: User ID
            name:
              type: string
              description: User full name
            email:
              type: string
              format: email
              description: User email
        assigned_team:
          type: object
          nullable: true
          properties:
            id:
              type: string
              description: Team ID
            name:
              type: string
              description: Team name
        record:
          type: object
          nullable: true
          description: >-
            The associated record (household, contact, or business) this task is
            linked to
          properties:
            id:
              type: string
              description: Record ID
            type:
              type: string
              enum:
                - household
                - contact
                - business
              description: Type of record
            name:
              type: string
              description: Name of the record
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
          description: Labels applied to the task
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: OAuth
      description: OAuth 2.0 Bearer Token from Clerk authentication

````