# pipelines.overview

Números por pipeline (lista de todos os pipelines). Pipelines não arquivados da conta com o que a lista de pipelines mostra: contatos, valor total, oportunidades abertas, ganhas e perdidas (quantidade e valor, em centavos), última atividade (a atualização mais recente de uma oportunidade), atendentes e tipos vinculados, e o funil por etapa (quantidade e valor).

- Endpoint: `POST https://app.atomiks.com.br/api/v1/pipelines.overview` (corpo JSON)
- Quem pode chamar: membro da conta
- Escopo da chave: `crm:read`
- Grava dados: não
- Pela chave de API: sim
- Ferramenta MCP: `pipelines_overview`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `pipelines.overview`)

## Entrada

Sem campos: envie `{}`.

<details><summary>JSON Schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/pipelines.overview \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

CLI:

```bash
node cli/atomiks.mjs pipelines.overview --json '{}'
```

MCP: ferramenta `pipelines_overview` com a mesma entrada.

## Saída

Sucesso: `{"data": ...}` com o formato abaixo.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "groupName": {
            "type": [
              "string",
              "null"
            ]
          },
          "isDefault": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "lastActivityAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalContacts": {
            "type": "number"
          },
          "totalValueCents": {
            "type": "number"
          },
          "openCount": {
            "type": "number"
          },
          "openValueCents": {
            "type": "number"
          },
          "wonCount": {
            "type": "number"
          },
          "wonValueCents": {
            "type": "number"
          },
          "lostCount": {
            "type": "number"
          },
          "lostValueCents": {
            "type": "number"
          },
          "attendantIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attendantTypeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stageId": {
                  "type": "string"
                },
                "stageName": {
                  "type": "string"
                },
                "displayOrder": {
                  "type": "number"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "open",
                    "won",
                    "lost"
                  ]
                },
                "cardCount": {
                  "type": "number"
                },
                "totalValueCents": {
                  "type": "number"
                }
              },
              "required": [
                "stageId",
                "stageName",
                "displayOrder",
                "type",
                "cardCount",
                "totalValueCents"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "name",
          "groupName",
          "isDefault",
          "createdAt",
          "lastActivityAt",
          "totalContacts",
          "totalValueCents",
          "openCount",
          "openValueCents",
          "wonCount",
          "wonValueCents",
          "lostCount",
          "lostValueCents",
          "attendantIds",
          "attendantTypeIds",
          "stages"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false
}
```

## Erros

`{"error": {"code", "message", "requestId"}}`. Códigos: `invalid_input` (400), `unauthorized` (401), `forbidden` / `account_pending` / `scope_missing` (403), `not_found` (404), `limit_reached` (409), `internal` (500).
