OneLink API v2.0 [Closed beta] - Overview

OneLink Rest API enables programmatic creation, management, and retrieval of short links used for redirection, deep linking, and measurement across different platforms and channels. Features in v2.0 include:

  • Programmatic creation and management of shortlinks
  • Programmatic QR code generation
  • Strict link validation to ensure smooth user journeys
  • Custom expiration windows

Beta documentation

This documentation is for the OneLink API V2.0 closed beta only. Please use the documentation in the following links only:

API Limitations:

LimitsRemarks
API quota limitThe limit for using the OneLink API to create, edit, or delete OneLink links is 7.5 million requests per month (UTC timezone), per account. POST, PUT, and DELETE requests count towards this limit. GET requests and GET QR requests are excluded. All requests that exceed the quota receive status code 429 with the message "Monthly quota exceeded". To check your monthly quota, you can either: Visit the OneLink API page in the AppsFlyer platform to view usage history from the past 4 months, or use the GET quota API to retrieve the current quota status (remaining requests). You can also use it to trigger internal alerts when usage nears your defined threshold.
Link visibilityLinks created via the API do not appear in the list of OneLink custom links in the AppsFlyer dashboard. Best practice: Save API-created links in your own system for future reference.
Parameter validationEvery link parameter in the body “data” gets validated before the link is created or updated (POST/PUT). If any of the parameters are invalid, the link won’t be created/updated, and the response will be error 400. The error code will be invalid_parameter, and will specify which parameter is invalid and why.
PayloadThe link parameters payload ("data" body parameter) value must not exceed 2048 characters.
Rate limitOneLink API endpoints support an increased limit of 1000 requests per second per account. GET QR code endpoint is limited to 25 requests per second per account. Exceeding these thresholds results in a 429 status with the message "Rate limit exceeded".
Source compatibilityLinks created using API V2 can only be accessed or modified through API V2 requests. For example, QR code generation is only available for shortlinks created via API V2, and update or delete operations must also originate from API V2.
Special charactersThere is no need to encode the payload parameters (key and values), with the exception of the following characters: <, >. Failure to encode them may break the link’s functionality.
TTL (Time To Live)Default TTL is 31 days. TTL is extended by the specified duration on each click or update. The maximum optional TTL is 365 days, and it can be set per link using the TTL body parameter in POST and PUT requests: ttl={value} (e.g., ttl=7d, ttl=12h). To prevent automatic extension, use renew_ttl=false. Default is true. Expired links default to the OneLink template base configuration behavior, but attribution does not work. It can take up to 48 hours for links to be deleted post-expiration date.
URL IDThe shortlink_id can be set or edited to textually identify the link's purpose or unique setup. For example, https://myapp.onelink.me/abc123/apples. The URL ID must not exceed 50 characters and can be a combination of letters and numbers. The default ID is 8 characters. If a custom ID already exists, the API returns a 409 error. The failed call still counts toward the monthly quota.
TTL (Time To Live)Default TTL is 31 days. TTL is extended by the specified duration on each click or update. The maximum optional TTL is 365 days, and it can be set per link using the TTL body parameter in POST and PUT requests: ttl={value} (e.g., ttl=7d, ttl=12h). To prevent automatic extension, use renew_ttl=false. Default is true. Expired links default to the OneLink template base configuration behavior, but attribution does not work. It can take up to 48 hours for links to be deleted post-expiration date.
URL IDThe shortlink_id can be set or edited to textually identify the link's purpose or unique setup. For example, https://myapp.onelink.me/abc123/apples. The URL ID must not exceed 50 characters and can be a combination of letters and numbers. The default ID is 8 characters. If a custom ID already exists, the API returns a 409 error. The failed call still counts toward the monthly quota.