Ruby
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
opts = {
channel_id: "550e8400-e29b-41d4-a716-446655440000",
from: "2024-01-01T00:00:00Z",
to: "2024-01-01T00:00:00Z",
tags: ["example1", "example2"]
}
Helo::Statistics.retrieve_totals(opts)import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.statistics.retrieveTotals({
channelId: "550e8400-e29b-41d4-a716-446655440000",
from: "2024-01-01T00:00:00Z",
to: "2024-01-01T00:00:00Z",
tags: ["example1", "example2"],
});package main
import (
"context"
"log"
"os"
"time"
"github.com/helo-email/helo-sdk-go"
)
func main() {
client := helo.NewHelo(os.Getenv("HELO_API_KEY"))
ctx := context.Background()
params := &helo.StatisticsRetrieveTotalsParams{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
From: time.Now(),
To: time.Now(),
Tags: []string{"example1", "example2"},
}
result, err := client.Statistics.RetrieveTotals(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}using System;
var stats = await helo.Statistics.RetrieveTotals(
from: DateTimeOffset.UtcNow.AddDays(-30),
to: DateTimeOffset.UtcNow);import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
stats = client.statistics.retrieve_totals(from_="2024-01-01", to="2024-01-31"){
"transactional": {
"sent": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"unsubscribed": 123,
"complained": 123
},
"broadcast": {
"sent": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"unsubscribed": 123,
"complained": 123
}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}Statistics
Retrieve all time statistics
Fetches cumulative statistics.
GET
/
activity
/
statistics
/
totals
Ruby
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
opts = {
channel_id: "550e8400-e29b-41d4-a716-446655440000",
from: "2024-01-01T00:00:00Z",
to: "2024-01-01T00:00:00Z",
tags: ["example1", "example2"]
}
Helo::Statistics.retrieve_totals(opts)import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.statistics.retrieveTotals({
channelId: "550e8400-e29b-41d4-a716-446655440000",
from: "2024-01-01T00:00:00Z",
to: "2024-01-01T00:00:00Z",
tags: ["example1", "example2"],
});package main
import (
"context"
"log"
"os"
"time"
"github.com/helo-email/helo-sdk-go"
)
func main() {
client := helo.NewHelo(os.Getenv("HELO_API_KEY"))
ctx := context.Background()
params := &helo.StatisticsRetrieveTotalsParams{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
From: time.Now(),
To: time.Now(),
Tags: []string{"example1", "example2"},
}
result, err := client.Statistics.RetrieveTotals(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}using System;
var stats = await helo.Statistics.RetrieveTotals(
from: DateTimeOffset.UtcNow.AddDays(-30),
to: DateTimeOffset.UtcNow);import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
stats = client.statistics.retrieve_totals(from_="2024-01-01", to="2024-01-31"){
"transactional": {
"sent": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"unsubscribed": 123,
"complained": 123
},
"broadcast": {
"sent": 123,
"delivered": 123,
"opened": 123,
"clicked": 123,
"bounced": 123,
"unsubscribed": 123,
"complained": 123
}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}⌘I