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

# Update a task

Update a task by id. <br><br> op is the operation to be performed, and path specifies what resource to patch. <br><br> Use the path tasks/0/links/assignee to update the assigned user, using their ID. 

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutshell API",
    "description": "The most powerful API in the world",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "app.nutshell.com/rest"
    }
  ],
  "paths": {
    "/tasks/{id}": {
      "patch": {
        "tags": [
          "Tasks"
        ],
        "summary": "Update a task",
        "description": "Update a task by id. <br><br> op is the operation to be performed, and path specifies what resource to patch. <br><br> Use the path tasks/0/links/assignee to update the assigned user, using their ID. ",
        "operationId": "fab5f8833c76cb64c8e82ec09416f467",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Ids are of the form 'n-tasks', where n is an integer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchInput"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "patchInput": {
        "type": "array",
        "items": {
          "properties": {
            "op": {
              "description": "The operation to perform",
              "type": "string",
              "enum": [
                "add",
                "remove",
                "replace",
                "move",
                "copy"
              ],
              "example": "add"
            },
            "path": {
              "description": "The path to the attribute to patch. Can be used to update custom fields as well, such as using /leads/0/{customFieldName}",
              "type": "string",
              "example": "/leads/0/links/accounts/337-accounts"
            },
            "value": {
              "description": "The value to set, can be various types, please refer to our guide on JSON Patch for more information",
              "type": "string",
              "example": "337-accounts"
            }
          },
          "type": "object"
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Tasks",
      "description": "Tasks"
    }
  ]
}
```