MailerSend Ruby SDK
- Installation
- Usage
- Support and Feedback
- License
gem install mailersend-ruby
You will have to initalize it in your Ruby file with require "mailersend-ruby"
.
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the email class
ms_email = Mailersend::Email.new(ms_client)
# Add parameters
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
ms_email.add_recipients("email" => "leslie@parksandrec.com", "name" => "Leslie")
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
ms_email.add_subject("Time")
ms_email.add_text("Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
ms_email.add_html("<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
# Send the email
ms_email.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the email class
ms_email = Mailersend::Email.new(ms_client)
# Add parameters
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
ms_email.add_recipients("email" => "leslie@parksandrec.com", "name" => "Leslie")
ms_email.add_cc("email" => "chris@parksandrec.com", "name" => "Chris")
ms_email.add_bcc("email" => "andy@parksandrec.com", "name" => "Andy")
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
ms_email.add_subject("Time")
ms_email.add_text("Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
ms_email.add_html("<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
# Send the email
ms_email.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the email class
ms_email = Mailersend::Email.new(ms_client)
# Add parameters
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
ms_email.add_recipients("email" => "leslie@parksandrec.com", "name" => "Leslie")
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
ms_email.add_subject("Time")
ms_email.add_template_id(12415125)
# Send the email
ms_email.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the email class
ms_email = Mailersend::Email.new(ms_client)
# Add parameters
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
ms_email.add_subject("Time {{ test }}")
ms_email.add_text("{{ test }}Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
ms_email.add_html("<b>{{ test }}Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
personalization = {
email: 'ron@parksandrec.com',
data: {
test: 'Test Value'
}
}
ms_email.add_personalization(personalization)
ms_email.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_bulk_email = Mailersend::BulkEmail.new(ms_client)
ms_bulk_email.messages = [
{
'from' => {"email" => "april@parksandrec.com", "name" => "April"},
'to' => [{"email" => "ron@parksandrec.com", "name" => "Ron"}],
'subject' => "Time",
'text' => "Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.",
'html' => "<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>",
},
{
'from' => {"email" => "april@parksandrec.com", "name" => "April"},
'to' => [{"email" => "leslie@parksandrec.com", "name" => "Leslie"}],
'subject' => "Lorem Ipsum",
'text' => "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
'html' => "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
}
]
ms_bulk_email.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_bulk_email = Mailersend::BulkEmail.new(ms_client)
ms_bulk_email.get_bulk_status(bulk_email_id: 'yourbulkemailid')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_tokens = Mailersend::Tokens.new(ms_client)
ms_tokens.create(name: "Very nice token", scopes: %w[ email_full domains_read ], domain_id: "yourdomainid")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_tokens = Mailersend::Tokens.new(ms_client)
ms_tokens.update(token_id: "d2220fx04", status: "paused")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_tokens = Mailersend::Tokens.new(ms_client)
ms_tokens.delete(token_id: "d2220fx04")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the email class
ms_email = Mailersend::Email.new(ms_client)
# Add parameters
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
ms_email.add_recipients("email" => "leslie@parksandrec.com", "name" => "Leslie")
ms_email.add_cc("email" => "chris@parksandrec.com", "name" => "Chris")
ms_email.add_bcc("email" => "andy@parksandrec.com", "name" => "Andy")
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
ms_email.add_subject("Time")
ms_email.add_text("Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
ms_email.add_html("<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
# You can add one or multiple attachments
ms.add_attachment(content: "/Users/Jerry/Desktop/doc.pdf", filename: "doc.pdf", disposition: "attachment")
ms.add_attachment(content: "/Users/Jerry/Desktop/pic.png", filename: "pic.png", disposition: "attachment")
ms_email.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_activity = Mailersend::Activity.new(ms_client)
ms_activity.get(domain_id: "xxx2241ll", page: 3, limit: 5, date_from: 1620643567, date_to: 1623321967)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_analytics = Mailersend::Analytics.new(ms_client)
ms_analytics.date(date_from: 1620643567, date_to: 1623321967, events: %w[sent queued])
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_analytics = Mailersend::Analytics.new(ms_client)
ms_analytics.country(date_from: 1620643567, date_to: 1623321967)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_analytics = Mailersend::Analytics.new(ms_client)
ms_analytics.ua_name(date_from: 1620643567, date_to: 1623321967)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_analytics = Mailersend::Analytics.new(ms_client)
ms_analytics.ua_type(date_from: 1620643567, date_to: 1623321967)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_inbound_routes = Mailersend::InboundRouting.new(ms_client)
ms_inbound_routes.get_inbound_routes
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_inbound_routes = Mailersend::InboundRouting.new(ms_client)
ms_inbound_routes.get_single_route(inbound_id: 'idofroute12412')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_inbound_routes = Mailersend::InboundRouting.new(ms_client)
ms_inbound_routes.settings =
{
'domain_id' => 'yourdomainid',
'name' => 'inbound_name',
'domain_enabled' => false,
'match_filter' => { 'type' => 'match_all' },
'forwards' => [{ 'type' => 'webhook', 'value' => 'https://example.com' }]
}
puts ms_inbound_routes.add_inbound_route
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_inbound_routes = Mailersend::InboundRouting.new(ms_client)
ms_inbound_routes.settings =
{
'domain_id' => 'yourdomainid',
'name' => 'inbound_updated',
'domain_enabled' => false,
'match_filter' => { 'type' => 'match_all' },
'forwards' => [{ 'type' => 'webhook', 'value' => 'https://example.com' }]
}
puts ms_inbound_routes.update_inbound_route(inbound_id: 'idofroute12412')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_inbound_routes = Mailersend::InboundRouting.new(ms_client)
ms_inbound_routes.delete_route(inbound_id: 'idofroute12412')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.list
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.single(domain_id: "idofdomain12412")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.add(name: 'yourdomain')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.delete(domain_id: "idofdomain12412")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.recipients(domain_id: "idofdomain12412")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.settings(domain_id: "idofdomain12412", track_clicks: true, track_unsubscribe: false)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.dns(domain_id: "idofdomain12412")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_domains = Mailersend::Domains.new(ms_client)
ms_domains.verify(domain_id: "idofdomain12412")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.list
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.single(identity_id: 'idofidentity123')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.single_by_email(email: 'example@email.com')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.add(domain_id: 'idofdomain12412', name: 'yourname', email: 'youremail')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.update(identity_id: 'idofidentity123', reply_to_email: 'replyemail', reply_to_name: 'replyname')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.update_by_email(email: 'example@email.com', reply_to_email: 'replyemail', reply_to_name: 'replyname')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.delete(identity_id: 'idofidentity123')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_sender_identity = Mailersend::SenderIdentity.new(ms_client)
ms_sender_identity.delete_by_email(email: 'example@email.com')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_messages = Mailersend::Messages.new(ms_client)
ms_messages.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_messages = Mailersend::Messages.new(ms_client)
ms_messages.single(message_id: "mess11454")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_scheduled_messages = Mailersend::ScheduledMessages.new(ms_client)
ms_scheduled_messages.get_list
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_scheduled_messages = Mailersend::ScheduledMessages.new(ms_client)
ms_scheduled_messages.get_signle(message_id: 'mess11454')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_scheduled_messages = Mailersend::ScheduledMessages.new(ms_client)
ms_scheduled_messages.delete(message_id: 'mess11454')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_recipients = Mailersend::Recipients.new(ms_client)
ms_recipients.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_recipients = Mailersend::Recipients.new(ms_client)
ms_recipients.single(recipient_id: "id124")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_recipients = Mailersend::Recipients.new(ms_client)
ms_recipients.delete(recipient_id: "id124")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_suppressions = Mailersend::Suppressions.new(ms_client)
// List from Blocklist
ms_suppressions.get_from_blocklist(domain_id: "xxx2241ll")
// List from Hard Bounces
ms_suppressions.get_hard_bounces(domain_id: "xxx2241ll")
// List from Spam Complaints
ms_suppressions.get_spam_complaints(domain_id: "xxx2241ll")
// List from Unsubscribers
ms_suppressions.get_unsubscribes(domain_id: "xxx2241ll")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_suppressions = Mailersend::Suppressions.new(ms_client)
// Add Recipient to Block List using recipients
ms_suppressions.add_to_blocklist(domain_id: "xxx2241ll", recipients: ["blocked@client.com"])
// Add Recipient to Block List using patterns
ms_suppressions.add_to_blocklist(domain_id: "xxx2241ll", patterns: ["*@client.com"])
// Add Recipient to Hard Bounces
ms_suppressions.add_to_hard_bounces(domain_id: "xxx2241ll", recipients: ["bounced@client.com"])
// Add Recipient to Spam Complaints
ms_suppressions.add_to_spam_complaints(domain_id: "xxx2241ll", recipients: ["bounced@client.com"])
// Add Recipient to Unsubscribes
ms_suppressions.add_to_unsubscribers(domain_id: "xxx2241ll", recipients: ["bounced@client.com"])
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_suppressions = Mailersend::Suppressions.new(ms_client)
// Delete from Block List
ms_suppressions.delete_from_blocklist(domain_id: 'yourdomainid', ids: ["xxx2241ll"])
// Delete from Hard Bounces
ms_suppressions.delete_from_hard_bounces(domain_id: 'yourdomainid', ids: ["xxx2241ll"])
// Delete from Spam Complaints
ms_suppressions.delete_from_spam_complaints(domain_id: 'yourdomainid', ids: ["xxx2241ll"])
// Delete from Unsubscribes
ms_suppressions.delete_from_unsubscribers(domain_id: 'yourdomainid', ids: ["xxx2241ll"])
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_webhooks = Mailersend::Webhooks.new(ms_client)
ms_webhooks.list(domain_id: "xxx2241ll")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_webhooks = Mailersend::Webhooks.new(ms_client)
ms_webhooks.single(webhook_id: "zzz2241ll")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_webhooks = Mailersend::Webhooks.new(ms_client)
ms_webhooks.create(domain_id: "xxx2241ll", url: "https://domain.com/hook", name: "Webhook", events: ["activity.sent", "activity.delivered"], enabled: true)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_webhooks = Mailersend::Webhooks.new(ms_client)
ms_webhooks.update(webhook_id: "zzz2241ll", enabled: false)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_webhooks = Mailersend::Webhooks.new(ms_client)
ms_webhooks.delete(webhook_id: "zzz2241ll")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_templates = Mailersend::Templates.new(ms_client)
ms_templates.list(domain_id: "aax455lll", page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_templates = Mailersend::Templates.new(ms_client)
ms_templates.single(template_id: "id124")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_templates = Mailersend::Templates.new(ms_client)
ms_templates.delete(template_id: "id124")
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_email_verification = Mailersend::EmailVerification.new(ms_client)
ms_email_verification.verify_an_email(email: 'example@email.com')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_email_verification = Mailersend::EmailVerification.new(ms_client)
ms_email_verification.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_email_verification = Mailersend::EmailVerification.new(ms_client)
ms_email_verification.get_single_list(email_verification_id: 'your-email-verification-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_email_verification = Mailersend::EmailVerification.new(ms_client)
ms_email_verification.create_a_list(name: "name-your-list", emails: ["example@email.com"])
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_email_verification = Mailersend::EmailVerification.new(ms_client)
ms_email_verification.verify_a_list(email_verification_id: 'your-email-verification-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
ms_email_verification = Mailersend::EmailVerification.new(ms_client)
ms_email_verification.get_list_results(email_verification_id: 'your-email-verification-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS class
ms_sms = Mailersend::SMS.new(ms_client)
# Add parameters
ms_sms.add_from('your-number')
ms_sms.add_to('client-number')
ms_sms.add_text('This is the message content')
personalization = {
phone_number: 'client-number',
data: {
test: 'Test Value'
}
}
ms_sms.add_personalization(personalization)
# Send the SMS
ms_sms.send
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Messages class
ms_sms_messages = Mailersend::SMSMessages.new(ms_client)
# Add parameters
ms_sms_messages.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Messages class
ms_sms_messages = Mailersend::SMSMessages.new(ms_client)
# Add parameters
ms_sms_messages.get_single_route(sms_message_id: 'your-sms-message-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_activity = Mailersend::SMSActivity.new(ms_client)
# Add parameters
ms_sms_activity.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_number = Mailersend::SMSNumber.new(ms_client)
# Add parameters
ms_sms_number.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_number = Mailersend::SMSNumber.new(ms_client)
# Add parameters
ms_sms_number.get(sms_number_id: 'your-sms-number-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_number = Mailersend::SMSNumber.new(ms_client)
# Add parameters
ms_sms_number.update(sms_number_id: 'your-sms-number-id', paused: false)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_number = Mailersend::SMSNumber.new(ms_client)
# Add parameters
ms_sms_number.delete(sms_number_id: 'your-sms-number-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_recipient = Mailersend::SMSRecipient.new(ms_client)
# Add parameters
ms_sms_recipient.list(page: 1, limit: 10)
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_recipient = Mailersend::SMSRecipient.new(ms_client)
# Add parameters
ms_sms_recipient.get(sms_recipient_id: 'your-sms-recipient-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Recipient class
ms_sms_recipient = Mailersend::SMSRecipient.new(ms_client)
# Add parameters
ms_sms_recipient.update(sms_recipient_id: 'your-sms-recipient-id', status: 'opt_out')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Inbounds class
ms_sms_inbounds = Mailersend::SMSInbounds.new(ms_client)
ms_sms_inbounds.list
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Inbounds class
ms_sms_inbounds = Mailersend::SMSInbounds.new(ms_client)
# Add parameters
ms_sms_inbounds.get_sms_inbound_route(sms_inbound_id: 'your-sms-inbound-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Inbounds class
ms_sms_inbounds = Mailersend::SMSInbounds.new(ms_client)
# Add parameters
ms_sms_inbounds.settings =
{
'forward_url' => 'https://your-forward-url',
'name' => 'name',
'events' => ['sms.sent', 'sms.delivered'],
'sms_number_id' => 'your-sms-number-id'
}
puts ms_sms_inbounds.add_sms_inbound_route
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Inbounds class
ms_sms_inbounds = Mailersend::SMSInbounds.new(ms_client)
# Add parameters
ms_sms_inbounds.settings =
{
'forward_url' => 'https://your-forward-url',
'name' => 'name',
'events' => ['sms.sent', 'sms.delivered'],
'sms_number_id' => 'your-sms-number-id'
}
puts ms_sms_inbounds.update_sms_inbound_route(sms_inbound_id: 'your-sms-inbound-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Inbounds class
ms_sms_inbounds = Mailersend::SMSInbounds.new(ms_client)
# Add parameters
ms_sms_inbounds.delete_sms_inbound_route(sms_inbound_id: 'your-sms-inbound-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Webhooks class
ms_sms_webhooks = Mailersend::SMSWebhooks.new(ms_client)
# Add parameters
ms_sms_webhooks.list(sms_number_id: 'your-sms-number-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Webhooks class
ms_sms_webhooks = Mailersend::SMSWebhooks.new(ms_client)
# Add parameters
ms_sms_webhooks.get_sms_webhook_route(sms_webhook_id: 'your-sms-webhook-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Webhooks class
ms_sms_webhooks = Mailersend::SMSWebhooks.new(ms_client)
# Add parameters
ms_sms_webhooks.settings =
{
'sms_number_id' => 'your-sms-number-id',
'name' => 'your-name',
'url' => 'https://your-url.com',
'events' => ['sms.sent', 'sms.delivered']
}
puts ms_sms_webhooks.add_sms_webhook_route
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Webhooks class
ms_sms_webhooks = Mailersend::SMSWebhooks.new(ms_client)
# Add parameters
ms_sms_webhooks.settings =
{
'sms_number_id' => 'your-sms-number-id',
'name' => 'your-name',
'url' => 'https://your-url.com',
'events' => ['sms.sent', 'sms.delivered']
}
puts ms_sms_webhooks.update_sms_webhook_route(sms_webhook_id: 'your-sms-webhook-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the SMS Webhooks class
ms_sms_webhooks = Mailersend::SMSWebhooks.new(ms_client)
# Add parameters
ms_sms_webhooks.delete_sms_webhook_route(sms_webhook_id: 'your-sms-webhook-id')
require "mailersend-ruby"
ms_client = Mailersend::Client.new('your_mailersend_token')
# Intialize the API Quota class
ms_api_quota = Mailersend::APIQuota.new(ms_client)
# Add parameters
ms_api_quota.get_api_quota
In case you find any bugs, submit an issue directly here in GitHub.
You are welcome to create SDK for any other programming language.
If you have any troubles using our API or SDK free to contact our support by email info@mailersend.com
The official documentation is at https://developers.mailersend.com