All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
create_sender | POST /senders | Create a new sender |
delete_sender | DELETE /senders/{senderId} | Delete a sender |
get_ips | GET /senders/ips | Get all the dedicated IPs for your account |
get_ips_from_sender | GET /senders/{senderId}/ips | Get all the dedicated IPs for a sender |
get_senders | GET /senders | Get the list of all your senders |
update_sender | PUT /senders/{senderId} | Update a sender |
validate_sender_by_otp | PUT /senders/{senderId}/validate | Update a sender |
CreateSenderModel create_sender(opts)
Create a new sender
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
opts = {
sender: Brevo::CreateSender.new # CreateSender | sender's name
}
begin
#Create a new sender
result = api_instance.create_sender(opts)
p result
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->create_sender: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sender | CreateSender | sender's name | [optional] |
- Content-Type: application/json
- Accept: application/json
delete_sender(sender_id)
Delete a sender
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
sender_id = 789 # Integer | Id of the sender
begin
#Delete a sender
api_instance.delete_sender(sender_id)
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->delete_sender: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | Integer | Id of the sender |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
GetIps get_ips
Get all the dedicated IPs for your account
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
begin
#Get all the dedicated IPs for your account
result = api_instance.get_ips
p result
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->get_ips: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetIpsFromSender get_ips_from_sender(sender_id)
Get all the dedicated IPs for a sender
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
sender_id = 789 # Integer | Id of the sender
begin
#Get all the dedicated IPs for a sender
result = api_instance.get_ips_from_sender(sender_id)
p result
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->get_ips_from_sender: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | Integer | Id of the sender |
- Content-Type: application/json
- Accept: application/json
GetSendersList get_senders(opts)
Get the list of all your senders
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
opts = {
ip: 'ip_example', # String | Filter your senders for a specific ip (available for dedicated IP usage only)
domain: 'domain_example' # String | Filter your senders for a specific domain
}
begin
#Get the list of all your senders
result = api_instance.get_senders(opts)
p result
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->get_senders: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
ip | String | Filter your senders for a specific ip (available for dedicated IP usage only) | [optional] |
domain | String | Filter your senders for a specific domain | [optional] |
- Content-Type: application/json
- Accept: application/json
update_sender(sender_id, opts)
Update a sender
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
sender_id = 789 # Integer | Id of the sender
opts = {
sender: Brevo::UpdateSender.new # UpdateSender | sender's name
}
begin
#Update a sender
api_instance.update_sender(sender_id, opts)
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->update_sender: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | Integer | Id of the sender | |
sender | UpdateSender | sender's name | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
validate_sender_by_otp(sender_id, opts)
Update a sender
# load the gem
require 'brevo'
# setup authorization
Brevo.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = Brevo::SendersApi.new
sender_id = 789 # Integer | Id of the sender
opts = {
otp: Brevo::Otp.new # Otp | otp
}
begin
#Update a sender
api_instance.validate_sender_by_otp(sender_id, opts)
rescue Brevo::ApiError => e
puts "Exception when calling SendersApi->validate_sender_by_otp: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | Integer | Id of the sender | |
otp | Otp | otp | [optional] |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json