> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amplemarket.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks

> Learn how to manage tasks via API

The tasks API allows you to

* list tasks
* skip tasks
* complete tasks

A typical flow includes:

1. Getting a list of tasks via `GET /tasks/`

2. Doing something about them outside Amplemarket

3. Skipping or completing the task via API

<Warning>Only `scheduled` and manual tasks can be completed via API (`status = scheduled` and `automatic = false`)</Warning>

# Task Object

| Field           | Type    | Description                                                                  |
| --------------- | ------- | ---------------------------------------------------------------------------- |
| `id`            | string  | The ID of the Task                                                           |
| `automatic`     | boolean | Whether the task was automatically created (e.g., by a sequence)             |
| `type`          | string  | The type of the task (e.g., `phone_call`, `email`)                           |
| `status`        | string  | The status of the task (e.g., `scheduled`, `completed`, `skipped`)           |
| `due_on`        | string  | The due date and time in ISO 8601 format                                     |
| `finished_on`   | string  | The completion date and time in ISO 8601 format (null if not finished)       |
| `notes`         | string  | Custom notes associated with the task                                        |
| `sequence_key`  | string  | The ID of the sequence that created the task (null if not from a sequence)   |
| `sequence_name` | string  | The name of the sequence that created the task (null if not from a sequence) |
| `user_id`       | string  | The ID of the user assigned to the task                                      |
| `user_email`    | string  | The email of the user assigned to the task                                   |
| `contact`       | object  | The contact associated with the task                                         |
| `contact.id`    | string  | The ID of the contact                                                        |
| `contact.name`  | string  | The name of the contact                                                      |
| `contact.email` | string  | The email of the contact                                                     |

## Example Task Object

```json theme={null}
{
  "id": "0198f652-bd65-7bc1-99e8-c9801331ecc7",
  "automatic": false,
  "type": "phone_call",
  "status": "scheduled",
  "due_on": "2025-08-29T12:54:34Z",
  "finished_on": null,
  "notes": "custom task notes",
  "sequence_key": null,
  "sequence_name": null,
  "user_id": "0198f652-bc9b-79c2-8b91-60e1bd43e45d",
  "user_email": "user@example.com",
  "contact": {
    "id": "0198f652-bd62-7cb8-9c22-05be51e2a231",
    "name": "User Amplemarket",
    "email": "user@amplemarket.com"
  }
}
```

# Errors

## Attempting to Complete an Ineligible Task

<Tip>If you attempt to complete an already completed task, the API will handle it gracefully and return an HTTP 200</Tip>

If you try to complete a task that is not eligible (e.g., automatic tasks or tasks not in `scheduled` status), you will receive an error response:

```json theme={null}
{
  "_errors": [
    {
      "status": "422",
      "code": "unsupported_value",
      "title": "Unsupported Value",
      "detail": "Task is in a state prevents it from being executed manually"
    }
  ]
}
```
