Attentive’s APIs allow you to send customer data to Attentive to further personalize your SMS strategy to drive more revenue per message. Our APIs can enable use cases such as transactional messaging, email orchestration, loyalty messaging, and much more.
This guide is intended for software developers or IT professionals responsible for integrating and using Attentive’s APIs within their own applications or platforms.
Table of contents
- Step 1: Create a custom app
- Step 2: Implement Attentive APIs
- Step 3: Set up journeys
- Step 4: Test implementation of Attentive APIs
- (Optional) Step 5: Set up segments
Step 1: Create a custom app
A custom app is required to generate an API key in order to use any of our APIs.
Create a custom app in the Attentive platform in the App Marketplace by clicking + Create App in the top-right corner.
Use the /me endpoint to test that you are authenticating correctly.
Keep your API key secure. If it’s accidentally shared, other users may be able to send messages to customers on your behalf.
Step 2: Implement Attentive APIs
To associate data from an Attentive API with an Attentive user, a phone number or email address is required. The phone number doesn't need to be an active SMS subscriber at the time the API call is made. If you send data associated with a phone number that’s associated with an SMS subscriber at a future date, Attentive automatically associates all historical data you have sent with that user.
Attentive supports a number of APIs that enable you to send data to Attentive:
Attentive's API | Description | Example use cases |
eCommerce API | Trigger an event when a user views a product, adds a product to their shopping cart, or makes a purchase. |
Mobile app tracking and purchase attribution In-store purchase attribution |
Offers API | Add discount codes to an existing offer. |
Replenish a set of unique discount codes |
Custom Events API | Trigger a custom event when a user performs an action that you’d like to use for targeting within Attentive segments or journeys. |
Transactional order updates Transactional subscription updates Loyalty updates Email orchestration On-site events (e.g., added to wishlist) |
Custom Attribute API | Create and update custom user attributes for use in Attentive’s segment builder. |
Loyalty Tier, Gender, Birthday, Estimated LTV, etc. |
Subscribers API | Capture SMS transactional and marketing opt-ins through third-party sign-up sources (e.g., checkout). Our team reviews all draft API opt-in units and provides recommendations prior
The Attentive API documentation site provides comprehensive documentation for each of our APIs.
Note: If you're using the Subscribers API, please contact your CSM or White Glove (whiteglove@attentivemobile.com) to retrieve the
signUpSourceID necessary to complete your API call and to confirm final implementation of your Subscribers API. See Subscribers for more information. |
Step 3: Set up journeys
Data sent from the eCommerce API or Custom Events API is available as a trigger in Attentive journeys.
- Go to Journeys.
- Click + Create journey.
- Click Start from scratch.
- Search for and select the trigger you want to use to start the journey.
- Click Continue.
- Choose whether the journey is marketing or transactional.
- Click Get started.
- Build and schedule your new journey.
Step 4: Test implementation of Attentive APIs
To test that Attentive APIs are working as expected, we recommend subscribing to your Attentive messaging program with your own phone number and making an API call using that phone number.
Attentive API | How to test |
eCommerce API |
|
Custom Events API |
|
Subscribers API |
|
Custom Attributes API |
|
(Optional) Step 5: Set up segments
Any data sent from the eCommerce API, Custom Events API, or Custom Attributes API is available as an option under Custom Attribute or Custom Event in Attentive’s segment builder:
- Go to Segments.
- Click + Create Segment.
- Choose Dynamic segment.
- From the Choose condition dropdown, click A subscriber’s characteristics.
- Search for and select the data you want to use to segment subscribers. Depending on the data, enter a value or select from a dropdown of possible values.
Finish building your segment. For more information, see What is segmentation?