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

# Updates a task. Send only the fields you want to change.

> An omitted field is left alone; re-sending a value the task already holds is a no-op
rather than an error, and records no activity. Sending nothing at all is a 400.
            
Lists replace outright: send an empty array to clear one. `LeadAssigneeId: 0`
removes the lead, and `ClearDueDate: true` removes the due date - a date field is
never cleared by omission.
            
Changing the status fires the same automation the app fires.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/projects/{projectId}/tasks/{taskId}
openapi: 3.0.4
info:
  title: Public API
  description: Gorelo Public API documentation.
  version: 1.0.0
servers:
  - url: https://api.usw.gorelo.io
    description: US
  - url: https://api.aue.gorelo.io
    description: Australia
security:
  - ApiKeyAuth: []
tags:
  - name: Attachments
    description: "Uploading a file, for anything that can carry one. One endpoint rather than one per record\r\ntype, because the upload itself is identical - only the record it is checked against differs."
  - name: Alerts
    description: Alerts management operations
  - name: Assets
    description: Assets management operations
  - name: Billing
    description: Billing management operations
  - name: Tickets
    description: Tickets management operations
  - name: Clients
    description: Clients management operations
  - name: Contacts
    description: Contacts management operations
  - name: Deletions
    description: Deletions management operations
  - name: Documents
    description: Documents management operations
  - name: Forms
    description: Forms management operations
  - name: Organization
    description: Organization management operations
  - name: Projects
    description: Projects management operations
paths:
  /v1/projects/{projectId}/tasks/{taskId}:
    patch:
      tags:
        - Projects
      summary: Updates a task. Send only the fields you want to change.
      description: "An omitted field is left alone; re-sending a value the task already holds is a no-op\r\nrather than an error, and records no activity. Sending nothing at all is a 400.\r\n            \r\nLists replace outright: send an empty array to clear one. `LeadAssigneeId: 0`\r\nremoves the lead, and `ClearDueDate: true` removes the due date - a date field is\r\nnever cleared by omission.\r\n            \r\nChanging the status fires the same automation the app fires."
      operationId: patch_v1_projects_projectId_tasks_taskId
      parameters:
        - name: projectId
          in: path
          description: Project the task belongs to.
          required: true
          schema:
            type: string
            format: uuid
        - name: taskId
          in: path
          description: Task to update.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Fields to change.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/UpdateTaskCommand'
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateTaskCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UpdateTaskResultBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTaskResultBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UpdateTaskResultBaseResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
components:
  schemas:
    UpdateTaskCommand:
      type: object
      properties:
        Title:
          type: string
          description: New task title.
          nullable: true
        SectionId:
          type: string
          description: >-
            Section to move the task to. Must be an active section of the same
            project.
          format: uuid
          nullable: true
        StatusId:
          type: integer
          description: 'New status: 1 Not started, 2 Working on it, 3 On hold, 4 Done.'
          format: int64
          nullable: true
        StatusReason:
          type: string
          description: >-
            Free-text reason recorded with the status. Only read when `StatusId`
            is sent.
          nullable: true
        PriorityId:
          type: integer
          description: >-
            New priority: None=0, Urgent=1, High=2, Normal=3, Low=4 - the ticket
            scale.
          format: int64
          nullable: true
        DueDate:
          type: string
          description: >-
            New due date (UTC). Send null to leave it alone; to clear it, send
            `ClearDueDate`.
          format: date-time
          nullable: true
        ClearDueDate:
          type: boolean
          description: >-
            Set true to remove the due date. A task's due date is otherwise
            never cleared by omission.
          nullable: true
        LeadAssigneeId:
          type: integer
          description: New lead assignee. Send 0 to remove the lead.
          format: int64
          nullable: true
        AssistingAssigneeIds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Replaces the assisting assignees outright. Send an empty array to
            remove them all.
          nullable: true
        WatcherIds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Replaces the watchers outright. Send an empty array to remove them
            all.
          nullable: true
        BlockedByTaskIds:
          type: array
          items:
            type: string
            format: uuid
          description: Replaces the tasks that must finish before this one can.
          nullable: true
        BlockingTaskIds:
          type: array
          items:
            type: string
            format: uuid
          description: Replaces the tasks this one is blocking.
          nullable: true
        AgentAssetIds:
          type: array
          items:
            type: string
            format: uuid
          description: Replaces the linked agent-managed assets.
          nullable: true
        CustomAssetIds:
          type: array
          items:
            type: string
            format: uuid
          description: Replaces the linked custom assets.
          nullable: true
        UptimeIds:
          type: array
          items:
            type: string
            format: uuid
          description: Replaces the linked uptime checks.
          nullable: true
        Banner:
          type: string
          description: New banner text. Send an empty string to remove it.
          nullable: true
        UpdatedByName:
          type: string
          description: "Display name to record as the actor. An API key is not a person, so when it is\r\nomitted or blank the actor is recorded as `API`."
          nullable: true
      additionalProperties: false
      description: "Request body for updating a task. Every field is optional - send only what you want to\r\nchange. An omitted field leaves the stored value alone; sending nothing at all is a 400\r\nrather than a no-op write."
    UpdateTaskResultBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          $ref: '#/components/schemas/UpdateTaskResult'
        DataContext:
          type: object
          additionalProperties: false
          nullable: true
          example: null
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    ObjectBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          nullable: true
        DataContext:
          $ref: '#/components/schemas/ErrorDataContext'
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    HttpStatusCode:
      enum:
        - 100
        - 101
        - 102
        - 103
        - 200
        - 201
        - 202
        - 203
        - 204
        - 205
        - 206
        - 207
        - 208
        - 226
        - 300
        - 301
        - 302
        - 303
        - 304
        - 305
        - 306
        - 307
        - 308
        - 400
        - 401
        - 402
        - 403
        - 404
        - 405
        - 406
        - 407
        - 408
        - 409
        - 410
        - 411
        - 412
        - 413
        - 414
        - 415
        - 416
        - 417
        - 421
        - 422
        - 423
        - 424
        - 426
        - 428
        - 429
        - 431
        - 451
        - 500
        - 501
        - 502
        - 503
        - 504
        - 505
        - 506
        - 507
        - 508
        - 510
        - 511
      type: integer
      format: int32
    UpdateTaskResult:
      type: object
      properties:
        Id:
          type: string
          description: Identifier of the updated task.
          format: uuid
      additionalProperties: false
      description: The identifier of the updated task.
    Error:
      type: object
      properties:
        Code:
          pattern: ^[0-9]{6}$
          type: string
          description: 6-digit MMTTNN error code. See the Public API error-code registry.
          example: '070101'
        Message:
          type: string
        PropertyName:
          type: string
          nullable: true
        ActionHint:
          type: string
          nullable: true
        DocUrl:
          type: string
          nullable: true
      additionalProperties: false
    ErrorDataContext:
      type: object
      properties:
        TraceId:
          type: string
          description: Request correlation id. Quote this when reporting a problem.
          nullable: true
      additionalProperties: false
      description: "The `DataContext` of an error response: carries the correlation id for the failed\r\nrequest."
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your Gorelo API key. See [Generate API key](/generate-api-key). If your
        data is hosted in Australia, click the base URL at the top of this page
        and select `https://api.aue.gorelo.io`.
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.