At a glance: OneLink REST API lets you create, get, update, and delete OneLink attribution links (short URLs).

Using OneLink API

OneLink API is used to:

  • Create, get, update, and delete OneLink short URLs automatically.
    Parameters can be either:
    • Attribution-related parameters, used for measuring and monitoring marketing efforts, like media source, campaign, adset, etc. Note: The media source (pid) parameter is mandatory. 
    • Personalization parameters, that let you configure a customized user experience when opening the app from the relevant link. These params let you send users to customized in-app content, for example, a specific product page, coupon code, promotion, etc.
  • Generate a large number of OneLink custom attribution links instantly.
    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.



Only use the OneLink API for links created using the OneLink API create command; not for other custom links.



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, and a special offer for bananas that are on sale.

Video tutorial




OneLink ID Unique identifier for the OneLink, configured in the OneLink template screen. 

Shortlink ID Given a OneLink API generated attribution link, the shortlink ID is the last element in the attribution link structure. In the shortlink ID is qwer987.
  • Time to Live, meaning the amount of time the attribution link record stays in the AppsFlyer system.
  • Default is 31 days.
  • One of the fields entered when creating the OneLink attribution link.


  • Make sure that the Unified Deep Linking (UDL) API for Android and iOS (or the legacy deep linking API) is implemented in the AppsFlyer SDK.
  • Get the OneLink ID from the dashboard user/marketer, and the OneLink API key from the account admin. Team members do not have access to the API Key. 

You need the OneLink API key as the authorization for each API command. The OneLink API key is passed in the authorization field in HTTP header.