parlo-sdk

Parlo - the Ruby gem for the Parlo API

The Parlo API sends transactional email and manages the sending domains it authenticates from. Marketing campaigns (audiences, templates, broadcasts) are designed and sent from the Parlo dashboard, not this API — the API is transactional-only at launch.

All requests authenticate with a company API key as an HTTP bearer token: Authorization: Bearer parlo_live_xxx. Errors return a JSON body of the shape { \"message\": string, \"code\": string }.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.24.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://getparlo.io

Installation

Build a gem

To build the Ruby code into a gem:

gem build parlo-sdk.gemspec

Then either install the gem locally:

gem install ./parlo-sdk-1.0.0.gem

(for development, run gem install --dev ./parlo-sdk-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'parlo-sdk', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'parlo-sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'parlo-sdk'

# Setup authorization
Parlo.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = Parlo::DomainsApi.new
create_domain_request = Parlo::CreateDomainRequest.new({name: 'yourdomain.com'}) # CreateDomainRequest | 

begin
  #Add a sending domain
  result = api_instance.create_domain(create_domain_request)
  p result
rescue Parlo::ApiError => e
  puts "Exception when calling DomainsApi->create_domain: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.getparlo.io/v1

Class Method HTTP request Description
Parlo::DomainsApi create_domain POST /domains Add a sending domain
Parlo::DomainsApi delete_domain DELETE /domains/id Remove a domain
Parlo::DomainsApi get_domain GET /domains/id Retrieve a domain
Parlo::DomainsApi list_domains GET /domains List sending domains
Parlo::DomainsApi verify_domain POST /domains/id/verify Re-check a domain's DNS
Parlo::EmailsApi get_email GET /emails/id Retrieve an email
Parlo::EmailsApi send_email POST /emails Send a transactional email

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication