<!-- Source: https://docs.vinsi.ai/api-docs/crm-activity-task-update -->
# Update Activity Task

Partially update an activity task (PATCH is also accepted). Only fields present in the body are changed. Setting status to Completed records completedAt; any other status clears it. Returns 403 if the task belongs to another organization.

```http
PUT https://dashboard.vinsi.ai/api/crm/activity-tasks/{taskId}
```

## Authentication

Send your API key in the `x-api-key` header. Create keys in the VINSI dashboard under Settings → API Keys.

## Headers

| Name | Type | Required |
|---|---|---|
| Content-Type | string | yes (application/json) |
| x-api-key | string | yes |

## Path parameters

| Name | Example |
|---|---|
| taskId | 901 |

## Example request body

```json
{
  "title": "Email the annual plan quote",
  "description": "Sent with the standard pricing template.",
  "status": "Completed",
  "assignedToId": "cmexampleuser0000000000002",
  "dueBy": "2026-09-17T17:00:00.000Z",
  "sortOrder": 1
}
```

## Example request

```bash
curl -X PUT 'https://dashboard.vinsi.ai/api/crm/activity-tasks/901' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"title":"Email the annual plan quote","description":"Sent with the standard pricing template.","status":"Completed","assignedToId":"cmexampleuser0000000000002","dueBy":"2026-09-17T17:00:00.000Z","sortOrder":1}'
```

## Example response

```json
{
  "id": 901,
  "activityId": 5120,
  "title": "Email the annual plan quote",
  "description": "Sent with the standard pricing template.",
  "status": "Completed",
  "assignedToId": "cmexampleuser0000000000002",
  "dueBy": "2026-09-17T17:00:00.000Z",
  "createdById": "cmexampleuser0000000000001",
  "completedAt": "2026-09-16T16:40:00.000Z",
  "sortOrder": 1,
  "lastDueReminderAt": null,
  "createdAt": "2026-09-15T20:15:00.000Z",
  "updatedAt": "2026-09-16T16:40:00.000Z",
  "AssignedTo": {
    "id": "cmexampleuser0000000000002",
    "firstName": "Sam",
    "lastName": "Rivera",
    "email": "sam.rivera@example.com"
  },
  "CreatedBy": {
    "id": "cmexampleuser0000000000001",
    "firstName": "Jane",
    "lastName": "Doe",
    "email": "jane.doe@example.com"
  }
}
```

