Skip to Content

Get hourly message distribution

Returns outbound message counts over the half-open selected instant range, bucketed by organization-local hour.

GET
/v1/analytics/hourly-distribution

Returns outbound message counts over the half-open selected instant range, bucketed by organization-local hour. Empty ranges return no rows; non-empty ranges include all 24 hours.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

namespaceId?string
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$
after?string
before?string

Response Body

Success

application/json
  1. response
[index: integer]?
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.analytics.getHourlyDistribution({});
Example Response
[
  {
    "hour": "string",
    "count": 0
  }
]

Related documentation