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

# Listar tarefas

> Retorna uma lista paginada de tarefas da organização.

## Endpoint

```
GET /v1/tasks
```

**Escopo necessário:** `read:tasks` — disponível nos planos **Growth e Scale**

## Parâmetros de query

| Parâmetro     | Tipo    | Descrição                                                                   |
| ------------- | ------- | --------------------------------------------------------------------------- |
| `limit`       | integer | Itens por página. Padrão: `25`. Máximo: `100`                               |
| `cursor`      | string  | Token de paginação                                                          |
| `status`      | string  | `pending`, `overdue`, `completed`                                           |
| `type`        | string  | `call`, `meeting`, `task`, `deadline`, `email`, `lunch`, `visit`, `message` |
| `priority`    | string  | `low`, `medium`, `high`, `urgent`                                           |
| `assigned_to` | string  | ID do responsável                                                           |
| `deal_id`     | string  | ID do negócio vinculado                                                     |
| `contact_id`  | string  | ID do contato vinculado                                                     |
| `due_before`  | string  | ISO 8601                                                                    |
| `due_after`   | string  | ISO 8601                                                                    |

## Exemplo de requisição

```bash theme={null}
curl "https://api.socialsell.ai/v1/tasks?status=overdue&priority=high" \
  -H "Authorization: Bearer sk_live_..."
```

## Exemplo de resposta

```json theme={null}
{
  "data": [
    {
      "id": "664d2e3f4a5b6c7890123456",
      "title": "Ligar para João sobre proposta",
      "description": "Confirmar detalhes do contrato e data de assinatura",
      "type": "call",
      "priority": "high",
      "status": "overdue",
      "assigned_to": {
        "id": "664a1b2c3d4e5f6789012345",
        "name": "Maria Santos"
      },
      "deal": {
        "id": "664c1d2e3f4a5b6789012347",
        "title": "Proposta Enterprise ACME"
      },
      "contact": {
        "id": "664f1a2b3c4d5e6f78901234",
        "name": "João Silva"
      },
      "company": null,
      "due_date": "2026-06-08T14:00:00.000Z",
      "completed_at": null,
      "created_at": "2026-06-01T09:00:00.000Z",
      "updated_at": "2026-06-01T09:00:00.000Z"
    }
  ],
  "meta": {
    "total": 23,
    "has_more": false,
    "next_cursor": null
  }
}
```

## Objeto tarefa

| Campo          | Tipo         | Descrição                                                                   |
| -------------- | ------------ | --------------------------------------------------------------------------- |
| `id`           | string       | ID da tarefa                                                                |
| `title`        | string       | Título                                                                      |
| `description`  | string\|null | Descrição                                                                   |
| `type`         | string       | `call`, `meeting`, `task`, `deadline`, `email`, `lunch`, `visit`, `message` |
| `priority`     | string       | `low`, `medium`, `high`, `urgent`                                           |
| `status`       | string       | `pending`, `overdue`, `completed`                                           |
| `assigned_to`  | object\|null | Responsável `{id, name}`                                                    |
| `deal`         | object\|null | Negócio vinculado `{id, title}`                                             |
| `contact`      | object\|null | Contato vinculado `{id, name}`                                              |
| `company`      | object\|null | Empresa vinculada `{id, name}`                                              |
| `due_date`     | string\|null | Data limite                                                                 |
| `completed_at` | string\|null | Data de conclusão                                                           |
| `created_at`   | string       | Timestamp de criação                                                        |
| `updated_at`   | string       | Timestamp de atualização                                                    |

## Regras de status

| Status      | Condição                                   |
| ----------- | ------------------------------------------ |
| `completed` | `isCompleted = true`                       |
| `overdue`   | `isCompleted = false` e `dueDate < agora`  |
| `pending`   | `isCompleted = false` e `dueDate >= agora` |
