OneLink API

At a glance: OneLink REST API enables creating, updating, retrieving, and deleting OneLink attribution links.

Overview

OneLink API is used to:

  • Create, get, update, and delete OneLink URLs automatically.
  • Generate a large number of OneLink custom attribution links.
    Note: For referral links, see the User invite attribution article
  • Customize OneLink URLs with your brand. This means that when you generate the URL, it has your brand domain, instead of the OneLink subdomain.

 Example

Feed Me, a grocery delivery service, wants to send a personalized link via SMS to existing customers to encourage them to download the Feed Me app and buy bananas. Based on the country of the customer, Feed Me uses the OneLink REST API to build a custom OneLink URL that contains specific details for the country, user identity (if logged in), and a special offer for bananas that are on sale.

Who is involved: 

Marketer and developer

Procedures

To set up OneLink API:

  1. Create a OneLink template.
  2. Record the OneLink ID. 

  3. Record the OneLink API key. The account admin needs to retrieve the API key. Team members do not have access to the API Key. 
    • In the AppsFlyer dashboard, go to Integration > API Access, and scroll down to the OneLink API section.

      OL_API_key.png

  4. Give the OneLink ID and the OneLink API key to the developer.
  5. Tell the developer to follow the instructions in the dev hub.

Limitations

Limitation

Remarks

API rate

The rate limit of creating OneLink attribution links via API is 250K per day, per account.

Custom links

  • Links created via the API do not appear in the list of OneLink custom links in the AppsFlyer dashboard.
  • There is no API that lists all OneLink custom links created with the API.

TTL 

  • Each OneLink attribution link created by the API has a default Time to Live (TTL) of 31 days. After 31 days this attribution link record is removed from our systems. Clicking on such a link once the TTL expires still defaults to the behavior defined in OneLink base configuration, but the attribution will not work.
  • Maximum TTL is 31 days. Any TTL value larger than 31 is overridden with the default TTL of 31.
  • TTL value can be specified in days (default), minutes or hours (for example, 10m, 20h, 14d).
  • You can send an update request to specify the TTL. Any update request resets the TTL to the one specified in the request body.

 

Was this article helpful?