---
title: "Conversation counts of the whole organization"
method: GET
path: "/organizations/{id_organization}/conversations_total"
tags: ["messages"]
---

# Conversation counts of the whole organization

`GET /organizations/{id_organization}/conversations_total`

## Request

- Base URL: `https://api.planvortex.com/v1.0.0`
- URL: `https://api.planvortex.com/v1.0.0/organizations/{id_organization}/conversations_total`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (client credentials, token URL `https://api.planvortex.com/v1.0.0/oauth/token`)

The same count as the per-account endpoint, adding up every account of the organization. Use it for the plan-consumption screen; use the per-account one to compare channels.

## Path parameters

- `id_organization` string, required

## Query parameters

- `from_date` string, date-time
- `to_date` string, date-time
- `group_by` 'day' | 'month' | 'year'

## Response `200`

Conversation counts

- union: Two different answers, not one with optional fields: **without** `group_by` you get `{total}`, **with** it you get `{stats, group}`. Never both.
  - object
    - `total` integer, required: Conversations in the range. A conversation is one contact on one day, so the same person writing on Monday and on Tuesday counts twice.
  - object
    - `group` 'day' | 'month' | 'year', required: The grouping that was applied.
    - `stats` object[], required: The series, sorted ascending. Empty when the range has no conversations.
      - `groupValue` integer, required: The **number** Mongo's `$dayOfYear` / `$month` / `$year` gives, not a date: 240 for day, 8 for month, 2026 for year. Two years in the same `day` series collide on the same value — narrow the range instead.
      - `totalConversations` integer, required

## Other responses

- `400`: Error. Classify by `code` in the body, never by the HTTP status.

---

[API](https://skmtc.dev/planvortex/apis/planvortex-api.md) · [All operations](https://skmtc.dev/planvortex/apis/planvortex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/planvortex/apis/planvortex-api/revisions/abedbbc1cd52?raw)
