Skip to main content

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:
Replace YOUR_API_KEY with your actual API key.

Obtaining Your API Key

You can find your API key on the Linkrunner settings page:
  1. Go to https://dashboard.linkrunner.io/settings?s=data-apis
  2. Locate your Server key on this page
  3. Use this key in the linkrunner-key header for all API requests
Keep your API key confidential. Do not share it or expose it in client-side code. Always make API requests from a secure server-side environment.

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 the is_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
Examples:
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
Behavior:
  • 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)
Validation:

Response

Standard Campaign Response:
Short Link Campaign Response:

Response Properties

3. Edit Campaign

Update an existing campaign.

Request

Request Body

Responses

  1. 200 Campaign updated successfully
  2. 400 Invalid request parameters
  3. 404 Campaign not found
  4. 500 Internal server error

Success Response

Error Responses

4. Delete Campaign

Delete an existing campaign.

Request

Responses

  1. 204 Campaign deleted successfully
  2. 400 Invalid request parameters
  3. 404 Campaign not found
  4. 500 Internal server error

Success Response

Error Responses

Best Practices

  1. Campaign naming: Use descriptive names that identify the purpose of the campaign
  2. Deep links: Ensure your deep links are properly formatted and lead to valid destinations
  3. Custom IDs: Use meaningful custom display IDs that are easy to recognize and remember. Duplicate ids are not allowed!
  4. Desktop links: Provide a link_for_desktop_users URL 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
Specific error responses for each endpoint are detailed in their respective sections above.

Domain and Store Listing Specific Errors

For any help please reach out to support@linkrunner.io