---
title: "chat.stats-result@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/chat.stats-result"
updated: null
---

# chat.stats-result@1 · OpenVibe.Services

HTML: [chat.stats-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/chat.stats-result)

# ChatStatsResult `chat.stats-result@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: chat
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/chat/stats-result.v1.json`](/docs/contracts/chat.stats-result.json)

chat.stats-result@1: the answer of POST /internal/chat/stats (chat.stats.read). site, user and stream answer messages (non-deleted chat\_messages rows) and chatters (distinct COALESCE(user\_id, anon\_id, source\_platform || username)); stream also answers sounds (soundboard plays); channel-top answers top\_chatters, most messages first; the kind site-daily is answered by chat.site-daily-result@1, not here. A failure is chat.ingress-ack@1's error ({ ok: false, error }).

## Fields

This schema has no named fields.

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: error

~~~~
{
  "ok": false,
  "error": "kind user needs user_id"
}
~~~~

Valid: stream

~~~~
{
  "ok": true,
  "messages": 1834,
  "chatters": 96,
  "sounds": 41
}
~~~~

Valid: top-chatters

~~~~
{
  "ok": true,
  "top_chatters": [
    {
      "user_id": 512,
      "username": "pixelfox",
      "display_name": "PixelFox",
      "count": 214
    },
    {
      "user_id": null,
      "username": "kick_viewer",
      "display_name": null,
      "count": 37
    }
  ]
}
~~~~

Rejected: chatter-without-count

~~~~
{
  "top_chatters": [
    {
      "user_id": 512,
      "username": "pixelfox",
      "display_name": "PixelFox"
    }
  ]
}
~~~~

Rejected: negative-count

~~~~
{
  "messages": -1
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('chat.stats-result@1', value);   // { valid, errors: [{ path, message }] }
~~~~
