| Method | HTTP request | Description |
|---|---|---|
| list | GET /channels | List all channels |
| create | POST /channels | Create a channel |
| retrieve | GET /channels/{id} | Retrieve a channel |
| update | PATCH /channels/{id} | Update a channel |
| delete | DELETE /channels/{id} | Delete a channel |
list(opts)
List all channels
Retrieves a list of all channels accessible to the current user.
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
opts = {
limit: 10,
offset: 10,
name: "example",
channel_ids: ["550e8400-e29b-41d4-a716-446655440000", "6ba7b810-9dad-11d1-80b4-00c04fd430c8"],
delivery_type: "live"
}
Helo::Channels.list(opts)create(create_channel_request)
Create a channel
Creates a new communication channel for organizing and routing messages.
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
create_channel_request = Helo::CreateChannelRequest.new(
name: "test-name",
delivery_type: Helo::DeliveryType::LIVE,
tracking: { links: true, opens: true }
)
Helo::Channels.create(create_channel_request)retrieve(id)
Retrieve a channel
Fetches the details and configuration of a specific channel.
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
id = "550e8400-e29b-41d4-a716-446655440000"
Helo::Channels.retrieve(id)update(id, update_channel_request)
Update a channel
Modifies an existing channel by ID.
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
id = "550e8400-e29b-41d4-a716-446655440000"
update_channel_request = Helo::UpdateChannelRequest.new(
name: "test-name",
delivery_type: Helo::DeliveryType::LIVE,
tracking: { links: true, opens: true }
)
Helo::Channels.update(id, update_channel_request)delete(id)
Delete a channel
Permanently removes a channel and all associated data.
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
id = "550e8400-e29b-41d4-a716-446655440000"
Helo::Channels.delete(id)