Build an app to connect with Attentive's APIs

Within Attentive, you can build an application and connect it with Attentive's APIs. To do so, follow the steps below:

  1. Create a custom app.
  2. Add a test subscriber.
  3. Create a journey with the Custom Events API.
  4. Create a segment with the Custom Attributes API.

Create a custom app

Follow the steps below to create an API key with which you can send and retrieve data.

  1. On the App Marketplace page, click + Create app.
    nav_page.png

  2. In the App name field, enter an internal-facing name.
  3. Add a Contact email so that Attentive can reach out to you if there are issues.
    2.png

  4. In the Permissions section, select Write next to each API that you would like to allow access to.
    (Optional) Click on the link to learn more about each API.
    3.png

  5. Click Create.
    Your API key appears.
    key.png

  6. Click Copy to save the API key.

If you forget to save your API key, you can regenerate the key by navigating to Marketplace > Built by you and selecting your app.

Add a test subscriber

After you create your custom app, create a subscriber to test the app. You can use the subscriber user endpoint or text-to-join to add a test subscriber. Then, you can begin to build out and test integrations with Attentive’s APIs.

/subscriptions

When you test with the /subscriptions endpoint, make sure to use a US phone number.

  1. Use the subscriber user endpoint to opt in.
    • You can find the signUpSourceId parameter on the Subscribers tab. In the example below, the signUpSourceId in the Sign-up method table is 64140.
      api_key.png

  2. When you receive an opt-in message, reply “Y”.

Text-to-join

If your CSM has set up text-to-join, you can follow the instructions below to receive test messages on your phone.

  1. On the Subscribers tab, go to the Sign-up method table.
    ttj.png

  2. Below Sign-up method, text the keyword to the assigned number. This subscribes your phone number.
    Note: If this doesn’t appear, your CSM hasn’t enabled this feature.

Create a journey with the Custom Events API

After you successfully complete a Custom Events API call, follow the steps below to build a journey. This will allow you to test your custom app and ensure that data is sent via the API. Then, we recommend using this journey to collect subscriber information.

  1. On the Journeys tab, click + Create journey and select Start from scratch.
  2. On the Choose a journey trigger page, select an event to initiate the journey, and click Get started.
  3. On the next page, select from the following options:
    • Notify subscribers about a transaction: Send transaction-specific information to your subscribers.
    • Send a message about something else: Send information that is not related to subscribers’ transactions.
  4. Drag Send text message to the journey and compose your message.
  5. (Optional) Click {} to incorporate personalization properties from the API. You can also add more steps and customizations to your journey. For more information, see Create a custom journey.
    journey.png

  6. When you’re satisfied, save your message.
  7. Click Turn on to enable the journey.
  8. Make a test call to the custom events endpoint. This should include the phone number that was previously added to the test account.

Create a segment with the Custom Attributes API

Use data from the Custom Attributes API endpoint to create segments. All associated data is stored in Attentive, whether or not the subscriber is active.

  1. On the Segments page, click + Create segment.
    A popup appears.
  2. Next to Dynamic segment, click Create.
  3. From the Choose condition drop-down, select A subscriber’s characteristics.
    Another drop-down appears.
  4. In the Choose characteristic drop-down, select your custom attribute.
  5. Fill out the remaining fields. These vary depending on the attribute you select.
    seg.png

  6. (Optional) Click And or Or to incorporate additional conditions.
  7. When you’re satisfied, click Create.
  8. Enter an internal-facing Name and click Save.
    save.png

    Your new segment is now available on the platform.

Articles in this section

Was this article helpful?
1 out of 1 found this helpful