Base URL
Authentication
All API requests require authentication using an API key. You must include this key in the header of every request.API Key Header
Include the following header in all API requests:YOUR_API_KEY with your actual API key.
Obtaining Your API Key
You can find your API key on the Linkrunner settings page:- Go to https://dashboard.linkrunner.io/settings?s=data-apis
- Locate your Server key on this page
- Use this key in the
linkrunner-keyheader for all API requests
Error Responses
- 401 Unauthorized
"Server key missing!""Server key invalid!"
- 429 Too Many Requests
- Message:
"Rate limit exceeded. Please try again later." - Cause: You’ve exceeded the rate limit of 10 requests per second.
Rate Limit Details
- Rate: 10 requests per second
- Status code on limit exceeded: 429 (Too Many Requests)
Endpoints
1. List Campaigns
For getting/listing existing campaigns, please refer to the List Campaigns API documentation.2. Create Campaign
Create a new campaign. You can optionally create a short link by including theis_shortlink: true parameter.
Request
Request Body Examples
Creating Campaign:Request Parameters
Note: If android_web_redirect or ios_web_redirect is provided, it will override the default store listing link for that platform within the campaign and redirect users to the specified URL instead.
Domain and Store Listing Features
Domain (domain)
The domain parameter allows you to specify which domain should be used for generating campaign links. This is useful when you have multiple domains configured for your project.
Parameter Type: string (domain name)
Behavior:
- If provided and valid: Campaign will use the specified domain for all link generation
- If not provided: Campaign will automatically use the project’s primary domain
- Must be a valid domain name that belongs to your project
Multiple Store Listings (store_listing_ids)
The store_listing_ids parameter allows you to associate multiple store listings with a single campaign.
Parameter Type: string[] (array of store listing ID strings)
Getting Store Listing IDs:
- Navigate to your Store Listings Dashboard
- View or create store listings for your project
- Copy the store listing IDs to use in your API requests
- Accepts an array of store listing ID strings
- Each ID must be a non-empty string
- All store listings must belong to your project
- Cannot have multiple store listings for the same platform (only one iOS and one Android listing per campaign)
Response
Standard Campaign Response:Response Properties
3. Edit Campaign
Update an existing campaign.Request
Request Body
Responses
- 200 Campaign updated successfully
- 400 Invalid request parameters
- 404 Campaign not found
- 500 Internal server error
Success Response
Error Responses
4. Delete Campaign
Delete an existing campaign.Request
Responses
- 204 Campaign deleted successfully
- 400 Invalid request parameters
- 404 Campaign not found
- 500 Internal server error
Success Response
Error Responses
Best Practices
- Campaign naming: Use descriptive names that identify the purpose of the campaign
- Deep links: Ensure your deep links are properly formatted and lead to valid destinations
- Custom IDs: Use meaningful custom display IDs that are easy to recognize and remember. Duplicate ids are not allowed!
- Desktop links: Provide a
link_for_desktop_usersURL to ensure desktop visitors are redirected to a relevant webpage instead of app stores.
Examples
Creating a New Campaign
Editing a Campaign
Deleting a Campaign
Error Handling
The API will return appropriate HTTP status codes along with error messages when issues occur. Common errors across all endpoints include:- 400 Bad Request: Missing required parameters or invalid input
- 401 Unauthorized: API key is required or invalid
- 404 Not Found: Campaign not found
- 429 Too Many Requests: You’ve exceeded the rate limit, please try again later
- 500 Internal Server Error: Contact support if this persists
Domain and Store Listing Specific Errors
For any help please reach out to support@linkrunner.io