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_hourly(opts)import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.statistics.retrieveHourly({
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.StatisticsRetrieveHourlyParams{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
From: time.Now(),
To: time.Now(),
Tags: []string{"example1", "example2"},
}
result, err := client.Statistics.RetrieveHourly(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}using System;
var stats = await helo.Statistics.RetrieveHourly(
from: DateTimeOffset.UtcNow.AddDays(-1),
to: DateTimeOffset.UtcNow);import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
stats = client.statistics.retrieve_hourly(from_="2024-01-01", to="2024-01-02"){
"results": [
{
"timestamp": "2023-11-07T05:31:56Z",
"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 hourly statistics
Fetches hourly aggregated statistics.
GET
/
activity
/
statistics
/
hourly
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_hourly(opts)import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.statistics.retrieveHourly({
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.StatisticsRetrieveHourlyParams{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
From: time.Now(),
To: time.Now(),
Tags: []string{"example1", "example2"},
}
result, err := client.Statistics.RetrieveHourly(ctx, params)
if err != nil {
log.Fatal(err)
}
_ = result
}using System;
var stats = await helo.Statistics.RetrieveHourly(
from: DateTimeOffset.UtcNow.AddDays(-1),
to: DateTimeOffset.UtcNow);import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
stats = client.statistics.retrieve_hourly(from_="2024-01-01", to="2024-01-02"){
"results": [
{
"timestamp": "2023-11-07T05:31:56Z",
"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