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-01",
to: "2024-01-01",
tags: ["example1", "example2"],
timezone: "America/New_York"
}
Helo::Statistics.retrieve_daily(opts)import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.statistics.retrieveDaily({
channelId: "550e8400-e29b-41d4-a716-446655440000",
from: "2024-01-01",
to: "2024-01-01",
tags: ["example1", "example2"],
timezone: "America/New_York",
});package main
import (
"context"
"log"
"os"
"github.com/helo-email/helo-sdk-go"
)
func main() {
client := helo.NewHelo(os.Getenv("HELO_API_KEY"))
ctx := context.Background()
params := &helo.StatisticsRetrieveDailyParams{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
From: "2024-01-01",
To: "2024-01-01",
Tags: []string{"example1", "example2"},
Timezone: "America/New_York",
}
result, err := client.Statistics.RetrieveDaily(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}using System;
var stats = await helo.Statistics.RetrieveDaily(
from: DateTimeOffset.UtcNow.AddDays(-30),
to: DateTimeOffset.UtcNow,
timezone: "America/New_York");import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
stats = client.statistics.retrieve_daily(
from_="2024-01-01",
to="2024-01-31",
timezone="America/New_York",
){
"results": [
{
"timestamp": "2023-12-25",
"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 daily statistics
Fetches daily aggregated statistics.
GET
/
activity
/
statistics
/
daily
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-01",
to: "2024-01-01",
tags: ["example1", "example2"],
timezone: "America/New_York"
}
Helo::Statistics.retrieve_daily(opts)import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.statistics.retrieveDaily({
channelId: "550e8400-e29b-41d4-a716-446655440000",
from: "2024-01-01",
to: "2024-01-01",
tags: ["example1", "example2"],
timezone: "America/New_York",
});package main
import (
"context"
"log"
"os"
"github.com/helo-email/helo-sdk-go"
)
func main() {
client := helo.NewHelo(os.Getenv("HELO_API_KEY"))
ctx := context.Background()
params := &helo.StatisticsRetrieveDailyParams{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
From: "2024-01-01",
To: "2024-01-01",
Tags: []string{"example1", "example2"},
Timezone: "America/New_York",
}
result, err := client.Statistics.RetrieveDaily(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}using System;
var stats = await helo.Statistics.RetrieveDaily(
from: DateTimeOffset.UtcNow.AddDays(-30),
to: DateTimeOffset.UtcNow,
timezone: "America/New_York");import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
stats = client.statistics.retrieve_daily(
from_="2024-01-01",
to="2024-01-31",
timezone="America/New_York",
){
"results": [
{
"timestamp": "2023-12-25",
"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