Website Logo
Solutions
Teams
Marketers
Data Leaders
Industries
Finance
Retail
Sports
Telecom
Other Industries
Integrations
Snowflake
Google BigQuery
Amazon Redshift
Data Warehouses
Destinations
Solutions
CRM Intelligence
Speak to your customers intelligently
Touchpoint Intelligence
See everything you say to customers
Cartographer
New
Manage UTM Parameters, get better reports
Pricing
Resources
BlogWebinarsWhitepapersMarketing, From the SourceDemos & VideosRecipesHelp Center
Company
AboutPressCareersSecurity
Get Demo
Phone menu toggle
  1. Help Center
  2. Audiences

Segments API

Personalize offers and content across your applications and website with Flywheel Segments API
By 
Joe Cristee
Last updated: 
February 6, 2023

Overview

The Segments API enables you to personalize experiences in your web and mobile applications. It is a lightning fast way to get customer information from a performant API sitting right on your cloud data stack. You can see customer information to use in personalization, and the audiences a user is currently qualified for.

‍

For instance, let's say you define a churned, high spender audience called "Churned High Value". When a user visits your app, you can check if they are in this audience to decide whether to provide them with an incentive to make a purchase to win them back.

‍

Access:

Access is controlled in Flywheel’s SaaS environment using an API key, please have your designated admin reach out to your assigned solutions architect to receive your API key. When making requests to the segments API, you’ll need to pass an Authorization header with a value of Bearer base64_encoded_api_key.

Audience List Endpoint

https://app.flywheelsoftware.com/v1/audiences

To list all available segments in your organization, you can use the endpoint listed above. This will return the Audience Name and Audience ID of all audiences currently exported to the segments API.

‍

Sample Call:

curl --location --request GET 'https://app.flywheelsoftware.com/v1/audiences' --header 'Authorization: Bearer ************************ 

‍

‍

Sample Response:

[{        
    "audience_id": 2100,        
    "audience_name": "Churned High Spenders"    
  },    
  {        
    "audience_id": 2101,        
    "audience_name": "High Frequency Buyers"    
}]

‍

‍

Audience Profile Endpoint

https://app.flywheelsoftware.com/v1/audiences?identifier=insert_id_here

‍

To list all audiences a user is a part of, you can query the base endpoint listed above and include an identifier parameter. The identifier parameter is tied to the unique identifier mapping chosen when connecting your Users Datasets to Flywheel.

‍

In addition to the audiences a user is a member of, this endpoint also returns customer profile information in an instant from any Users Dataset or Users Model configured in Flywheel from your data warehouse. You can query the base endpoint listed above and include an identifier parameter. The identifier parameter is tied to the unique identifier mapping chosen when connecting your Users Dataset to Flywheel. This is great for serving personalization, recommendations, or creatives that have been stored for a customer in your data warehouse.

‍

Sample Call:

curl --location --request GET 'https://app.flywheelsoftware.com/v1/audiences?identfier=1729271?usermodel=1' --header 'authorization: Bearer ************************

‍

Sample Response:

{        
  "id": 1729271, 
  "first_name": "Joe",
  "last_name": "Cristee",
  "audiences": [
    {        
      "audience_id": 2100,        
      "audience_name": "Churned High Spenders"    
    },
    {        
      "audience_id": 152,        
      "audience_name": "Incentive User"    
    }
  ],
  "total_spend": 572.00,
  "churn_risk_score": 0.78
  "last_purchase_date": "12/21/2020",
  "gender": "Male",
  "most_frequent_purchase_category": "Electronics",
  "last_purchase_category": "Shoes",
  "incentive_recommendations": {
  	"incentives": [
      {
        "id": 4
        "name": "Buy $50, Get Free Shipping"
        "expiration": "12/30/2020"
      },
      {
        "id": 6
        "name": "20% off"
        "expiration": "12/30/2020"
      },
    ]
  }
}

‍

Our customers are leveraging the Segments API to bring the power of their Cloud Data Stack to drive personalized experiences in mobile applications and their CMS. If you are interested in learning more reach out to solutions@flywheelsoftware.com.

You can find our full list of subprocessors in our DPA.

Related Articles

Configuring Audience Exports to Salesforce
Learn how to configure your Flywheel exports to match audience members across your Salesforce leads, contacts and accounts.
How to use Flex Filters to supercharge your fan targeting
Learn how to use Flex Filters to create robust fan audiences using signals across datasets.
Copy an Audience
Learn how to copy and modify an existing audience.
Intro to Audiences
Learn the difference between Start with the Basics, Build with a Recipe, and Build from Scratch.

Get Personal Support

Leave a message
call anytime
1800 583 281
Flywheel Software Logo
LinkedIn ProfileYoutube ChannelTwitter ProfileGitlab ProfileCrunchbase Profile
© 2023 Flywheel Software
Company
  • About
  • Press
  • Careers
  • Security
  • Contact
Solutions
  • Marketers
  • Data Leaders
Integrations
  • Snowflake
  • Google BigQuery
  • Amazon Redshift
  • Data Warehouses
  • Destinations
Resources
  • Blog
  • Webinars
  • Whitepapers
  • Demos & Videos
  • Recipes
  • Help Center
  • Service Desk
Legal
  • All Policies
  • Terms of Service
  • Privacy Policy