Phyllo - the Ruby gem for the API References

The Phyllo API is built on RESTful principles and returns JSON encoded responses and accepts JSON payloads. It is only available through HTTPS to ensure the security of the data in transfer. These APIs must be called only from your server and never from your app / frontend as this is a security concern.

The API operates in three environments: sandbox, staging and production.

The sandbox environment returns mock data and is used for testing the basic functionality of the system.

The staging environment is exactly like a production environment but with certain limitations. It is used for your internal testing and development purposes.

The production environment connects to real platform accounts and all data reads and writes are made to live accounts. This is what you would use to get data for your customers.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1.0
  • Package version: 1.0.0
  • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit


Build a gem

To build the Ruby code into a gem:

gem build phyllo.gemspec

Then either install the gem locally:

gem install ./phyllo-1.0.0.gem

(for development, run gem install --dev ./phyllo-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 'phyllo', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository:, then add the following in the Gemfile:

gem 'phyllo', :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 'phyllo'

# Setup authorization 
# NOTE: credentials are different between environments (e.g. sandbox, staging, production)
Phyllo.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'CLIENT_ID'
  config.password = 'CLIENT_SECRET'

api_instance =
id = 'id_example' # String | Unique identifier for the artist

  #Retrieve an artist (user activity)
  result = api_instance.v1_get_media_activity_artist_by_id(id)
  p result
rescue Phyllo::ApiError => e
  puts "Exception when calling ActivityApi->v1_get_media_activity_artist_by_id: #{e}"

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
Phyllo::ActivityApi v1_get_media_activity_artist_by_id GET /v1/media/activity/artists/id Retrieve an artist (user activity)
Phyllo::ActivityApi v1_get_media_activity_artists GET /v1/media/activity/artists Retrieve artists for an account (user activity)
Phyllo::ActivityApi v1_get_media_activity_content_by_id GET /v1/media/activity/contents/id Retrieve a content (user activity)
Phyllo::ActivityApi v1_get_media_activity_contents GET /v1/media/activity/contents Retrieve contents for an account (user activity)
Phyllo::ActivityApi v1_search_media_activity_artists POST /v1/media/activity/artists/search Retrieve artists for an account (user activity) in bulk
Phyllo::ActivityApi v1_search_media_activity_contents POST /v1/media/activity/contents/search Retrieve contents for an account (user activity) in bulk
Phyllo::ConnectApi v1_connect_get_users GET /v1/users Retrieve all users
Phyllo::ConnectApi v1_connect_get_users_by_external_id GET /v1/users/external_id/external_id Retrieve a user by external ID
Phyllo::ConnectApi v1_connect_get_users_by_id GET /v1/users/id Retrieve a user
Phyllo::ConnectApi v1_connect_get_work_platforms GET /v1/work-platforms Retrieve all work platforms
Phyllo::ConnectApi v1_connect_get_work_platforms_by_id GET /v1/work-platforms/id Retrieve a work platform
Phyllo::ConnectApi v1_connect_post_sdk_tokens POST /v1/sdk-tokens Create an SDK token
Phyllo::ConnectApi v1_connect_post_users POST /v1/users Create a user
Phyllo::ConnectApi v1_disconnect_account_by_id POST /v1/accounts/id/disconnect Disconnect an account
Phyllo::ConnectApi v1_stream_get_accounts GET /v1/accounts Retrieve all accounts
Phyllo::ConnectApi v1_stream_get_accounts_by_id GET /v1/accounts/id Retrieve an account
Phyllo::EngagementApi postv1pubcontentssearch POST /v1/publications/contents/search Retrieve publication content items in bulk
Phyllo::EngagementApi postv1socialcontentgroupssearch POST /v1/social/content-groups/search Retrieve content group items in bulk
Phyllo::EngagementApi postv1socialcontentssearch POST /v1/social/contents/search Retrieve content items in bulk
Phyllo::EngagementApi v1_engagement_get_comments GET /v1/social/comments Retrieve all comments
Phyllo::EngagementApi v1_fetch_historic_social_content_groups POST /v1/social/content-groups/fetch-historic Fetch historic content groups
Phyllo::EngagementApi v1_fetch_historic_social_contents POST /v1/social/contents/fetch-historic Fetch historic content items
Phyllo::EngagementApi v1_refresh_social_content_groups POST /v1/social/content-groups/refresh Refresh content groups
Phyllo::EngagementApi v1_refresh_social_contents POST /v1/social/contents/refresh Refresh content items
Phyllo::EngagementApi v1_stream_get_content_groups GET /v1/social/content-groups Retrieve all content groups
Phyllo::EngagementApi v1_stream_get_content_groups_by_id GET /v1/social/content-groups/id Retrieve a content group
Phyllo::EngagementApi v1_stream_get_contents GET /v1/social/contents Retrieve all content items
Phyllo::EngagementApi v1_stream_get_contents_by_id GET /v1/social/contents/id Retrieve a content item
Phyllo::EngagementApi v1_streampub_get_contents GET /v1/publications/contents Retrieve all publication content items
Phyllo::EngagementApi v1_streampub_get_contents_by_id GET /v1/publications/contents/id Retrieve a publication content item
Phyllo::IdentityApi v1_get_audience_demographics GET /v1/audience Retrieve audience demographics
Phyllo::IdentityApi v1_refresh_profile POST /v1/profiles/refresh Refresh a profile
Phyllo::IdentityApi v1_stream_get_profile_by_id GET /v1/profiles/id Retrieve a profile
Phyllo::IdentityApi v1_stream_get_profiles GET /v1/profiles Retrieve all profiles
Phyllo::IncomeApi v1_fetch_historic_commerce_income_balances POST /v1/commerce/income/balances/fetch-historic Fetch historic e-commerce balances for an account
Phyllo::IncomeApi v1_fetch_historic_commerce_income_payouts POST /v1/commerce/income/payouts/fetch-historic Fetch historic e-commerce payouts for an account
Phyllo::IncomeApi v1_fetch_historic_commerce_income_transactions POST /v1/commerce/income/transactions/fetch-historic Fetch historic e-commerce transactions for an account
Phyllo::IncomeApi v1_fetch_historic_social_income_payouts POST /v1/social/income/payouts/fetch-historic Fetch historic social payouts for an account
Phyllo::IncomeApi v1_fetch_historic_social_income_transactions POST /v1/social/income/transactions/fetch-historic Fetch historic social transactions for an account
Phyllo::IncomeApi v1_get_commerce_income_balance_by_id GET /v1/commerce/income/balances/id Retrieve a e-commerce balance
Phyllo::IncomeApi v1_get_commerce_income_balances GET /v1/commerce/income/balances Retrieve e-commerce balances for an account
Phyllo::IncomeApi v1_get_commerce_income_payout_by_id GET /v1/commerce/income/payouts/id Retrieve a e-commerce payout
Phyllo::IncomeApi v1_get_commerce_income_payouts GET /v1/commerce/income/payouts Retrieve e-commerce payouts for an account
Phyllo::IncomeApi v1_get_commerce_income_transaction_by_id GET /v1/commerce/income/transactions/id Retrieve a e-commerce transaction
Phyllo::IncomeApi v1_get_commerce_income_transactions GET /v1/commerce/income/transactions Retrieve e-commerce transactions for an account
Phyllo::IncomeApi v1_get_social_income_payout_by_id GET /v1/social/income/payouts/id Retrieve a social payout
Phyllo::IncomeApi v1_get_social_income_payouts GET /v1/social/income/payouts Retrieve social payouts for an account
Phyllo::IncomeApi v1_get_social_income_transaction_by_id GET /v1/social/income/transactions/id Retrieve a social transaction
Phyllo::IncomeApi v1_get_social_income_transactions GET /v1/social/income/transactions Retrieve social transactions for an account
Phyllo::IncomeApi v1_refresh_commerce_income_balances POST /v1/commerce/income/balances/refresh Refresh e-commerce balances for an account
Phyllo::IncomeApi v1_refresh_commerce_income_payouts POST /v1/commerce/income/payouts/refresh Refresh e-commerce payouts for an account
Phyllo::IncomeApi v1_refresh_commerce_income_transactions POST /v1/commerce/income/transactions/refresh Refresh e-commerce transactions for an account
Phyllo::IncomeApi v1_refresh_social_income_payouts POST /v1/social/income/payouts/refresh Refresh social payouts for an account
Phyllo::IncomeApi v1_refresh_social_income_transactions POST /v1/social/income/transactions/refresh Refresh social transactions for an account
Phyllo::IncomeApi v1_search_commerce_income_balances POST /v1/commerce/income/balances/search Retrieve e-commerce balances in bulk
Phyllo::IncomeApi v1_search_commerce_income_payouts POST /v1/commerce/income/payouts/search Retrieve e-commerce payouts in bulk
Phyllo::IncomeApi v1_search_commerce_income_transactions POST /v1/commerce/income/transactions/search Retrieve e-commerce transactions in bulk
Phyllo::IncomeApi v1_search_social_income_payouts POST /v1/social/income/payouts/search Retrieve social payouts in bulk
Phyllo::IncomeApi v1_search_social_income_transactions POST /v1/social/income/transactions/search Retrieve social transactions in bulk
Phyllo::PublishApi v1_get_social_content_publish GET /v1/social/contents/publish/id Check status of content publish
Phyllo::PublishApi v1_social_content_publish POST /v1/social/contents/publish Publish content to a platform
Phyllo::WebhookApi v1_webhook_delete_webhooks_by_id DELETE /v1/webhooks/id Delete a webhook
Phyllo::WebhookApi v1_webhook_get_webhooks GET /v1/webhooks Retrieve all webhooks
Phyllo::WebhookApi v1_webhook_get_webhooks_by_id GET /v1/webhooks/id Retrieve a webhook
Phyllo::WebhookApi v1_webhook_post_webhooks POST /v1/webhooks Create a webhook
Phyllo::WebhookApi v1_webhook_post_webhooks_send POST /v1/webhooks/send Send a mock webhook notification
Phyllo::WebhookApi v1_webhook_put_webhooks_by_id PUT /v1/webhooks/id Update a webhook

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Basic Authentication

  • Type: HTTP basic authentication