---
updatedAt: 2026-08-13T04:11:04.000Z
agentTools:
  projectIndex: https://docs.api.getrotor.com/llms.txt
---

# Update a task

Updates an existing task. Only the fields provided in the request
body are changed, and only the rules covering those fields are
re-checked — so a task whose linked contact was later archived can
still have its status or name updated. An empty body is a
successful no-op that returns the task unchanged.

Requires the `tasks:update` scope.


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Rotor OpenAPI",
    "description": "Public-facing API for Rotor — a CRM and field service platform built for home service businesses.\n\nCurrent version: `1.1.0`\n\n## Authentication\n\nAll requests must be authenticated with a company API key.\n\n- Header: `x-api-key: rotor_{keyId}_{keySecret}`\n- Version header: `rotor-api-version: 1.1.0`\n\nAPI keys are scoped to a specific company and can be managed by company administrators in **Settings → Integrations → API Keys**.\n\n## Rate Limits\n\nEach API key is limited to **1000 requests per UTC day** across all OpenAPI endpoints.\n\n## Scopes\n\nEach API key is granted specific scopes that control what actions it can perform:\n\n| Scope | Description |\n|---|---|\n| `leads:create` | Create and update leads |\n| `leads:read` | Read lead records |\n| `customers:create` | Create and update customers |\n| `customers:read` | Read customer records |\n| `service_plans:read` | Read service plan records |\n| `jobs:read` | Read serviced job records |\n| `pins:read` | Read pin records and pin types |\n| `timesheets:read` | Read timesheet records and visit timer records |\n| `tasks:read` | Read task records |\n| `tasks:create` | Create tasks |\n| `tasks:update` | Update tasks |\n| `configuration:read` | Read company configuration (service types, line item templates) |\n\n## Getting Started\n\n1. **Set the required version header**: Send `rotor-api-version: 1.1.0` with every request\n2. **Create an API key**: Go to Settings → Integrations → API Keys, create a key with the scopes you need\n3. **For testing**: Use `GET /auth/test` to verify your credentials\n",
    "version": "1.1.0",
    "contact": {
      "name": "Rotor API Support",
      "url": "https://getrotor.com"
    }
  },
  "servers": [
    {
      "url": "https://api.getrotor.com/open-api",
      "description": "Production server"
    },
    {
      "url": "http://localhost:3000/open-api",
      "description": "Development server"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/tasks/{id}": {
      "patch": {
        "summary": "Update a task",
        "description": "Updates an existing task. Only the fields provided in the request\nbody are changed, and only the rules covering those fields are\nre-checked — so a task whose linked contact was later archived can\nstill have its status or name updated. An empty body is a\nsuccessful no-op that returns the task unchanged.\n\nRequires the `tasks:update` scope.\n",
        "operationId": "updateTask",
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RotorApiVersionHeader"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "message": {
                      "type": "string",
                      "example": "Task updated successfully"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "RotorApiVersionHeader": {
        "name": "rotor-api-version",
        "in": "header",
        "description": "Required OpenAPI version header.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "1.1.0"
          ],
          "default": "1.1.0"
        },
        "example": "1.1.0"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Authentication required",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Authentication required. Provide x-api-key header.",
              "error_code": "AUTHENTICATION_REQUIRED"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Insufficient scope",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Forbidden: required scope 'leads:read' not granted for this API key",
              "error_code": "INSUFFICIENT_SCOPE"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Not found"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Validation error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Validation failed",
              "errors": [
                {
                  "field": "email",
                  "message": "Invalid email format"
                }
              ]
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Daily API key rate limit exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Daily API key request limit of 1000 exceeded",
              "error_code": "RATE_LIMIT_EXCEEDED"
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": "error",
              "message": "Internal server error"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "error"
          },
          "message": {
            "type": "string",
            "example": "Validation failed"
          },
          "error_code": {
            "type": "string",
            "description": "Machine-readable error code",
            "example": "INSUFFICIENT_SCOPE"
          },
          "limit": {
            "type": "integer",
            "description": "Daily request limit for the API key when rate limited",
            "example": 1000
          },
          "requests_today": {
            "type": "integer",
            "description": "Number of requests already consumed today by the API key",
            "example": 1000
          },
          "reset_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC timestamp when the daily request counter resets",
            "example": "2026-03-31T00:00:00Z"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "example": "email"
                },
                "message": {
                  "type": "string",
                  "example": "Invalid email format"
                }
              }
            }
          }
        }
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique task identifier"
          },
          "name": {
            "type": "string",
            "description": "Task name",
            "example": "Follow up on roof estimate"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "waiting",
              "done"
            ],
            "description": "Task status"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "Task priority"
          },
          "notes": {
            "type": "string",
            "nullable": true,
            "description": "Free-form task notes"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the task is due (ISO 8601)"
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Optional end date (ISO 8601); must be on or after due_date"
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Linked lead or customer ID"
          },
          "contact_type": {
            "type": "string",
            "enum": [
              "lead",
              "customer"
            ],
            "nullable": true,
            "description": "Type of the linked contact"
          },
          "assigned_to": {
            "type": "array",
            "description": "IDs of the company members assigned to this task",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "position": {
            "type": "integer",
            "description": "Display ordering position"
          },
          "created_by": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "ID of the user who created the task (null for API-key created tasks)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the task was created"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "priority",
          "assigned_to",
          "position"
        ]
      },
      "UpdateTaskInput": {
        "type": "object",
        "description": "All fields are optional. Only the fields provided are updated.\n",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "waiting",
              "done"
            ]
          },
          "notes": {
            "type": "string",
            "maxLength": 2000,
            "nullable": true
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "contact_type": {
            "type": "string",
            "enum": [
              "lead",
              "customer"
            ],
            "nullable": true
          },
          "assigned_to": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Company API key in the format: `rotor_{keyId}_{keySecret}`\n\nTo obtain an API key:\n1. Log into your Rotor dashboard\n2. Go to Settings → Integrations → API Keys\n3. Create a new key and select the scopes you need\n4. Copy the key — it's only shown once!\n"
      }
    }
  },
  "tags": [
    {
      "name": "Tasks",
      "description": "Read, create, and update tasks"
    }
  ]
}
```