---
title: Tasks
slug: tasks
description: Learn how to assign tasks to contacts or accounts using the Task resource in Salesmachine. Retrieve tasks individually or as a list with detailed information such as ID, creation timestamp, type, status, subject, content, due date, completion timestamp, a
createdAt: 2023-09-28T16:31:28.945Z
---

The Task resource is the way to assign task to users linked to contacts or accounts in Salesmachine. Tasks can be retrieved individually or as a list.

***

### Model

A task object contains the following fields

| **Attribute** | **Type**  | **Description**                                          |
| ------------- | --------- | -------------------------------------------------------- |
| object        | string    | Value is ‘task’                                          |
| id            | string    | Salesmachine internal id representing the task           |
| created\_at   | timestamp | The time (in seconds) the task was added to Salesmachine |
| type          | string    | Can be "todo", "call", "meeting'", "email"               |
| status        | string    | Task can be 'open' or 'close'                            |
| subject       | string    | Task subject                                             |
| body          | string    | The Task content.                                        |
| due\_at       | timestamp | Time at which this Task should be completed              |
| completed\_at | timestamp | Time of Task completion                                  |
| account       | object    | The account linked to this task                          |
| contact       | object    | The contact linked to this task                          |
| assignee      | object    | Reference to the user to whom this task is assigned      |

***

```json
{
  "object":      "task",
  "id":          "6120e071155b81197607c55b",
  "created_at":  1629544561,
  "type":        "todo",
  "status":      "close",
  "subject":     "remember the milk",
  "body":        "don't forget",
  "due_at":      1632136561,
  "completed_at": 1629544561,
  "account": {
    "object":    "account",
    "id":        "6120e071155b81197607c557"
  },
  "assignee": {
    "object":  "user",
    "id":      "6120e070155b81197607c507"
  }
}
```

