---
updatedAt: 2026-10-21T11:44:02.000Z
agentTools:
  projectIndex: https://dev.daisybill.com/llms.txt
---

# Update Task

Updates a task's due date or assigned user, or completes it. A completed task cannot be updated.

# Notes:

**Only custom tasks can be completed via API**

**Non-custom tasks are completed via an action performed in the daisyBill app**

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://go.daisybill.com/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-default": "",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/tasks/{id}": {
      "patch": {
        "summary": "Update Task",
        "description": "Updates a task's due date or assigned user, or completes it. A completed task cannot be updated.",
        "operationId": "update-task",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Task assignment ID (the `id` returned by the task list endpoints).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "task"
                ],
                "properties": {
                  "task": {
                    "type": "object",
                    "description": "Only the fields you send are changed.",
                    "properties": {
                      "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "YYYY-MM-DD. An invalid date returns 400."
                      },
                      "assigned_user_id": {
                        "type": "integer",
                        "description": "User in the bill's organization. Any other user returns 404."
                      },
                      "completed_by_id": {
                        "type": "integer",
                        "description": "Completes the task as this user (in the bill's organization). Only custom tasks, such as those made with Create Task, can be completed; for other tasks it is ignored."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"created_at\": \"2017-06-07T07:47:13.056-07:00\",\n  \"updated_at\": \"2017-06-07T07:47:13.186-07:00\",\n  \"context\": {\n    \"create_source\": \"API\"\n  },\n  \"id\": 4165113,\n  \"due_date\": \"2019-08-08\",\n  \"message\": \"Upload Paper EOR\",\n  \"completed_on\": \"2017-06-07T07:47:13.180-07:00\",\n  \"comments\": [],\n  \"links\": [\n    {\n      \"rel\": \"bill\",\n      \"href\": \"/api/v1/bills/1002511\"\n    },\n    {\n      \"rel\": \"completed_by\",\n      \"href\": \"/api/v1/users/1074\"\n    },\n    {\n      \"rel\": \"assigned_user\",\n      \"href\": \"/api/v1/users/470\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "required": [
                    "created_at",
                    "updated_at",
                    "id",
                    "due_date",
                    "message",
                    "comments",
                    "links"
                  ],
                  "properties": {
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "context": {
                      "type": "object",
                      "description": "How the record was created. Omitted when unknown.",
                      "properties": {
                        "create_source": {
                          "type": "string",
                          "enum": [
                            "API",
                            "Web",
                            "CSV Import",
                            "837 Import",
                            "Background",
                            "Internal"
                          ],
                          "example": "API"
                        }
                      }
                    },
                    "id": {
                      "type": "integer",
                      "description": "Task assignment ID. Use it with `/tasks/{id}`.",
                      "example": 4164832
                    },
                    "due_date": {
                      "type": "string",
                      "format": "date",
                      "example": "2017-06-06"
                    },
                    "message": {
                      "type": "string",
                      "example": "Supporting Document Required"
                    },
                    "completed_on": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the task was completed. Omitted while the task is open."
                    },
                    "comments": {
                      "type": "array",
                      "description": "Notes on the task, oldest first. Empty when the task has no notes. Add one with `POST /tasks/{id}/comments`.",
                      "items": {
                        "type": "object",
                        "required": [
                          "created_at",
                          "updated_at",
                          "id",
                          "content",
                          "links"
                        ],
                        "properties": {
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "context": {
                            "type": "object",
                            "description": "How the record was created. Omitted when unknown.",
                            "properties": {
                              "create_source": {
                                "type": "string",
                                "enum": [
                                  "API",
                                  "Web",
                                  "CSV Import",
                                  "837 Import",
                                  "Background",
                                  "Internal"
                                ],
                                "example": "API"
                              }
                            }
                          },
                          "id": {
                            "type": "integer",
                            "example": 88213
                          },
                          "content": {
                            "type": "string",
                            "example": "Called the adjuster"
                          },
                          "links": {
                            "type": "array",
                            "description": "`user`: the user who added the note.",
                            "items": {
                              "type": "object",
                              "required": [
                                "rel",
                                "href"
                              ],
                              "properties": {
                                "rel": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "href": {
                                  "type": "string",
                                  "example": "/api/v1/users/470"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "links": {
                      "type": "array",
                      "description": "`bill`, `assigned_user`, and `completed_by` once the task is completed.",
                      "items": {
                        "type": "object",
                        "required": [
                          "rel",
                          "href"
                        ],
                        "properties": {
                          "rel": {
                            "type": "string",
                            "enum": [
                              "bill",
                              "assigned_user",
                              "completed_by"
                            ]
                          },
                          "href": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The model failed validation (`{\"errors\": {field: [messages]}}`), the JSON body could not be parsed, or a POST/PUT/PATCH request carried URL query parameters (`{\"error\": \"...\"}`). An invalid `due_date`, or a past `due_date` on an overdue-processing task, returns 400.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": {\n    \"field_name\": [\n      \"can't be blank\"\n    ]\n  }\n}"
                  },
                  "Invalid due date": {
                    "value": "{\n  \"errors\": {\n    \"due_date\": [\n      \"may not be in the past\"\n    ]\n  }\n}"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The API token is missing or invalid, the user is not active, or the organization does not have API access.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"API Token provided is not valid\"\n}"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The organization is locked for an overdue invoice.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Your organization is locked for overdue invoice.\"\n}"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. A required parameter is missing or a parameter is invalid (wrong type, value outside the allowed range, `per_page` above the maximum, bad date filter), or the path is not a valid endpoint. A missing `task` returns 403.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"per_page must be less than or equal 25\"\n}"
                  },
                  "Missing task": {
                    "value": "{\n  \"error\": \"task is missing\"\n}"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. The record does not exist or your user cannot access it. An `assigned_user_id` or `completed_by_id` from another organization returns 404.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"404 not found\"\n}"
                  },
                  "User in another organization": {
                    "value": "{\n  \"error\": \"User with '1074' id belongs to another organization than bill\"\n}"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable. The task is already completed.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Task is completed and can not be updated\"\n}"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The rate limit (100 requests per minute per user by default) was exceeded. Check the `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining` and `X-Rate-Limit-Reset` headers, which are sent on every response.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Rate limit exceeded\"\n}"
                  }
                }
              }
            },
            "headers": {
              "X-Rate-Limit-Limit": {
                "description": "Requests allowed per minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Rate-Limit-Remaining": {
                "description": "Requests remaining in the current minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Rate-Limit-Reset": {
                "description": "UTC time when the window resets",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl \\\n  https://go.daisybill.com/api/v1/tasks/4165113 \\\n  -s \\\n  -X PATCH \\\n  -H \"Content-Type: application/json\" \\\n  -H 'Authorization: Bearer {API_TOKEN}' \\\n  -d '{\n  \"task\": {\n    \"due_date\": \"2019-08-08\",\n    \"completed_by_id\": 1074\n  }\n}'"
            },
            {
              "language": "ruby",
              "code": "task = DaisybillApi::Models::Task.find(4165113)\ntask.due_date = \"2019-08-08\"\ntask.save"
            }
          ],
          "samples-languages": [
            "curl",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```