# Update task

> Change any of its fields.

Source: https://docs.mycrmsim.com/docs/tasks/update-task

```http
PATCH https://backend.mysmsgateway.app/api/v1/ext/tasks/{id}
```

- Category: myCRMSIM Tasks / Tasks
- Auth: Bearer access token
- Scope: `tasks.write`

Send only what changes. Changing `due_at` or `reminder_minutes_before` sets the reminder again. To complete or reopen, use the endpoints below.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | number | yes | Task id. Example: `300` |
| `title` | body | string | no | Up to 255 characters. |
| `description` | body | string | no | Details, up to 5000 characters. |
| `priority` | body | enum | no | Default medium. One of: `low`, `medium`, `high`. |
| `due_at` | body | string | no | ISO 8601. null for no due date. Example: `2026-11-03T09:00:00Z` |
| `reminder_minutes_before` | body | number | no | 0–43200. Needs a due_at. null for no reminder. Example: `15` |
| `assignee_id` | body | number | no | The account owner, or a subaccount admin id from List subaccount admins. null to unassign. |
| `contact_id` | body | number | no | A contact in the same workspace. null to unlink. |
| `opportunity_id` | body | number | no | An opportunity in the same workspace. null to unlink. |

## Request body

```json
{
  "due_at": "2026-11-04T09:00:00Z",
  "priority": "medium"
}
```

## Response fields (task)

| Field | Type | Description |
| --- | --- | --- |
| `id` | number | Task id. |
| `workspace_id` | number | The workspace it belongs to. |
| `title` | string | What has to be done. |
| `description` | string, nullable | Details. |
| `priority` | string | "low", "medium" or "high". |
| `status` | string | "open" or "completed". |
| `due_at` | string (ISO 8601), nullable | When it is due, UTC. |
| `reminder_minutes_before` | number, nullable | Minutes before due_at the assignee is reminded. |
| `reminder_at` | string (ISO 8601), nullable | When the reminder goes out (worked out from the two above). |
| `assignee_id` | number, nullable | The team member it is assigned to — the account owner or one of its subaccount admins. |
| `contact` | object, nullable | The linked contact: id, first_name, last_name, email, phone_number, company_name. |
| `opportunity` | object, nullable | The linked opportunity: id, name, status. |
| `completed_at` | string (ISO 8601), nullable | When it was completed. |

## Response 200

OK

```json
{
  "success": true,
  "message": "Task updated",
  "data": {
    "id": 300,
    "workspace_id": 7,
    "title": "Call Ann back about the quote",
    "description": null,
    "priority": "medium",
    "status": "open",
    "due_at": "2026-11-04T09:00:00.000Z",
    "reminder_minutes_before": 15,
    "reminder_at": "2026-11-04T08:45:00.000Z",
    "assignee_id": 41,
    "contact_id": 1234,
    "contact": {
      "id": 1234,
      "first_name": "Ann",
      "last_name": "Lee",
      "email": "ann@example.com",
      "phone_number": "+61412345678",
      "company_name": "Lee Studio"
    },
    "opportunity_id": null,
    "opportunity": null,
    "completed_at": null,
    "created_at": "2026-10-27T09:00:00.000Z",
    "updated_at": "2026-10-27T09:00:00.000Z"
  }
}
```

## Response 400

Nothing to update, or an invalid field

```json
{
  "success": false,
  "message": "assignee_id must be a member of this account"
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): tasks.write. This integration was granted: …"
}
```

## Response 404

Task does not exist or is not in a workspace of the installer

```json
{
  "success": false,
  "message": "Task not found or not accessible to this token"
}
```
