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.
The Attentive API documentation site provides comprehensive documentation for each of our APIs.
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 a user in the Attentive platform, 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 |
| Access Token |
Exchange a temporary authorization code (generated during app installation) for an access token using the OAuth authorization code grant flow. This token is used to authenticate, grant, and control permissions for your application when making API calls. |
Authenticating public applications to use Attentive’s API resources. Enabling third-party apps to access Attentive APIs on behalf of users. |
| eCommerce API | Use the eCommerce API to 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 (beta) | 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.
Note: This data cannot contain any sensitive or special categories of information as defined in applicable data protection and privacy laws, including the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). See a list of specific categories of data you cannot share with Attentive here.
|
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.
Note: This data cannot contain any sensitive or special categories of information as defined in applicable data protection and privacy laws, including the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). See a list of specific categories of data you cannot share with Attentive here.
|
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.
Notes:
|
|
| Webhooks API | Create and manage webhooks. |
Receive real-time notifications for events such as See Webhooks for a full list of events. |
| Product Catalog API | Enables sending high-performing journeys such as back in stock, low inventory, and price drop. It also lets you segment your customers and branch journeys using product data. |
Enable high-performing journeys (e.g., back in stock, low inventory, price drop), segment customers based on their product interaction activity, and branch journeys using product data such as name, category, or price. See Product Catalog for detailed file format and implementation instructions. |
| Privacy Request API | Use the Privacy Request API in order to comply with California Consumer Privacy Act (CCPA) deletion requests through Attentive. | Programmatically submit user data deletion requests and check the status of these requests. |
| Identity API (beta) | Manage user identifiers. With this API, you can programmatically add a client user identifier or custom identifier(s) to a user. | Associate various identifiers (e.g., client user ID, custom IDs) with a user's phone, email, Shopify ID, or Klaviyo ID to build a unified user profile. |
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 using the Attentive API testing console. This is a browser-based tool that offers a seamless environment for testing and validating your API requests. You can also subscribe to your Attentive messaging program with your own phone number and make 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?