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. To group Linkrunner links under a project-level custom channel such as WhatsApp, Offline QR, or CleverTap Push, include custom_channel_names.

Request

Request Body Examples

Creating Campaign:
Creating Campaign with a Custom Channel:

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:
Custom Channel Grouping (custom_channel_names)
The custom_channel_names parameter lets you group Linkrunner campaigns under a custom channel for dashboard filtering and channel-level aggregation.
Note: Linkrunner currently supports only one custom channel per campaign.
Parameter Type: string[] (array containing at most one custom channel name) Behavior:
  • If the channel already exists and is active for the project, the campaign is attached to it
  • If the channel does not exist, Linkrunner creates it for the project and attaches the campaign to it
  • The channel code is generated from the name by lowercasing it and replacing non-alphanumeric characters with underscores
  • A campaign can have at most one custom channel
  • Default channel names such as Google, Meta, Reddit, Snapchat, TikTok, LinkedIn, Apple Search Ads, Organic, Linkrunner Links, and None cannot be used as custom channel names
Examples:

Response

Standard Campaign Response:
Short Link Campaign Response:

Response Properties

Note: Some responses may include legacy custom-channel aliases such as custom_channel, custom_channel_code, custom_channel_name, custom_channel_codes, or custom_channel_names. Use custom_channels as the canonical response field.

3. Edit Campaign

Update an existing campaign.

Request

Request Body

To remove the custom channel from a campaign, pass an empty array:
To clear a web field, pass an empty string or null. Omitting a field leaves its stored value unchanged:
Changes to website, android_web_redirect and ios_web_redirect are applied to live campaign links immediately — the cached copy the click path serves is cleared as part of the update.

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

Custom Channel Specific Errors

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