---
updatedAt: 2026-06-29T14:38:44.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Edit task

To edit a singular task, you can add the task ID into the method URL. The task object is passed.

**Limitations**\
The method is available in correspondence to the user rights.

**Data type header when the request is successful**\
Content-Type: application/hal+json

**Data type header in case of an error**\
Content-Type: application/problem+json

## Response parameters

Only properties `“id”` and `“updated_at”` are returned.

## Complete a task

To complete a task, properties `“result”` and `“is_completed”` should be passed.

### An example of the request

In the following example we will complete a task using the `/api/v4/tasks/4747929` endpoint.

```json
{
    "is_completed": true,
    "result": {
        "text": "Reached the client"
    }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "kommo-api-references",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{subdomain}.kommo.com",
      "variables": {
        "subdomain": {
          "default": "subdomain"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v4/tasks/{id}": {
      "patch": {
        "summary": "Edit task",
        "description": "To edit a singular task, you can add the task ID into the method URL. The task object is passed.",
        "operationId": "edit-task",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Task ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Task id",
                        "format": "int32"
                      },
                      "responsible_user_id": {
                        "type": "integer",
                        "description": "Task responsible user ID. Current user ID by default",
                        "format": "int32"
                      },
                      "entity_id": {
                        "type": "integer",
                        "description": "ID of the entity the task is linked to.",
                        "format": "int32"
                      },
                      "entity_type": {
                        "type": "string",
                        "description": "Type of the entity the task is linked to.",
                        "enum": [
                          "leads",
                          "contacts",
                          "companies"
                        ]
                      },
                      "is_completed": {
                        "type": "boolean",
                        "description": "Defines whether the task is completed."
                      },
                      "task_type_id": {
                        "type": "integer",
                        "description": "Task type",
                        "format": "int32"
                      },
                      "text": {
                        "type": "string",
                        "description": "Task description"
                      },
                      "duration": {
                        "type": "integer",
                        "description": "Task duration in seconds",
                        "format": "int32"
                      },
                      "complete_till": {
                        "type": "integer",
                        "description": "Task deadline date in the format of Unix Timestamp.",
                        "format": "int32"
                      },
                      "result": {
                        "type": "object",
                        "description": "Task result",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Task result text"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "id": 4745251,
                    "task_type_id": 2,
                    "text": "New task description",
                    "complete_till": 1588885140
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request successfull",
            "content": {
              "application/hal+json": {
                "examples": {
                  "Tasks edited successfully": {
                    "value": "{\n    \"_links\": {\n        \"self\": {\n            \"href\": \"https://example.kommo.com/api/v4/tasks\"\n        }\n    },\n    \"_embedded\": {\n        \"tasks\": [\n            {\n                \"id\": 4745251,\n                \"updated_at\": 1588760725,\n                \"request_id\": \"0\",\n                \"_links\": {\n                    \"self\": {\n                        \"href\": \"https://example.kommo.com/api/v4/tasks/4745251\"\n                    }\n                }\n            }\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_links": {
                      "type": "object",
                      "properties": {
                        "self": {
                          "type": "object",
                          "properties": {
                            "href": {
                              "type": "string",
                              "example": "https://example.kommo.com/api/v4/tasks"
                            }
                          }
                        }
                      }
                    },
                    "_embedded": {
                      "type": "object",
                      "properties": {
                        "tasks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 4745251,
                                "default": 0
                              },
                              "updated_at": {
                                "type": "integer",
                                "example": 1588760725,
                                "default": 0
                              },
                              "request_id": {
                                "type": "string",
                                "example": "0"
                              },
                              "_links": {
                                "type": "object",
                                "properties": {
                                  "self": {
                                    "type": "object",
                                    "properties": {
                                      "href": {
                                        "type": "string",
                                        "example": "https://example.kommo.com/api/v4/tasks/4745251"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "examples": {
                  "Invalid data given. Details are available in the request response": {
                    "value": "{\n  \"title\": \"Bad Request\",\n  \"type\": \"https://httpstatus.es/400\",\n  \"status\": 400,\n  \"detail\": \"Invalid request data\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "examples": {
                  "User is not authorized": {
                    "value": "{\n  \"title\": \"Unauthorized\",\n  \"type\": \"https://httpstatus.es/401\",\n  \"status\": 401,\n  \"detail\": \"Invalid user name or password\"\n}"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "Cannot modify Booking Task": {
                    "summary": "Cannot modify Booking Task",
                    "value": {
                      "title": "Forbidden",
                      "type": "https://httpstatus.es/403",
                      "status": 403,
                      "detail": "Client UUID mismatch between request data and authenticated client"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```