Base URL
Authentication
All API requests require authentication. Include your server key in the request headers.Error Responses
- 401 Unauthorized
"Unauthorized access."
- Missing or invalid API key
- 429 Too Many Requests
- Message:
"Rate limit exceeded. Please try again later."
- Cause: You’ve exceeded the rate limit of 30 requests per second.
- Message:
Rate Limit Details
- Rate: 30 requests per second
- Status code on limit exceeded: 429 (Too Many Requests)
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. (Refer instructions below)
Obtaining Your API Key
You can find your API key on the Linkrunner settings page:- Go to https://www.linkrunner.io/settings?s=data-apis
- Locate your Server key on this page
- Use this key in the
linkrunner-key
header for all API requests
Endpoints
1. List Campaigns
Retrieve a paginated list of campaigns with optional filtering by status or specific link.Request
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
filter | string | No | Filter campaigns by status. Options: ACTIVE , INACTIVE , ALL (default: ALL ) |
link | string | No | Filter campaigns by a specific link URL. The system will extract the campaign from the provided link. |
page | number | No | The page number to retrieve. Must be a positive integer. (default: 1 ) |
limit | number | No | The number of campaigns to return per page. Must be between 1 and 1000. (default: 100 , max: 1000 ) |
Pagination
Pagination is automatically applied to all requests with the following defaults:- Default page: 1
- Default limit: 100 campaigns per page
- Maximum limit: 1000 campaigns per page
Example Requests
- Basic Request (returns first 100 campaigns):
- Filter Active Campaigns with Pagination:
- Get Campaign by Link:
- All Campaigns with Custom Limit:
Response
Error Responses
Status Code | Error Message | Description |
---|---|---|
400 | ”Invalid request parameters.” | Invalid link, domain not found, or campaign not found |
401 | ”Unauthorized access.” | Missing or invalid API key |
422 | ”Invalid page number ''. Page must be a positive integer…” | Page parameter is not a positive integer |
422 | ”Invalid limit ''. Limit must be between 1 and 1000…” | Limit parameter is not between 1 and 1000 |
422 | ”Limit exceeds maximum allowed value of 1000…” | Limit exceeds 1000 |
TypeScript Types
2. Get Attributed Users
Retrieve a paginated list of users attributed to a specific campaign with optional time range filtering.Request
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
display_id | string | Yes | The display ID of the campaign to retrieve attributed users for |
start_timestamp | string | No | Start time in ISO 8601 format (e.g., “2025-06-23T10:29:26.074”) |
end_timestamp | string | No | End time in ISO 8601 format (e.g., “2025-06-23T10:29:26.074”) |
timezone | string | No | IANA timezone identifier. See IANA Time Zone Database (default: UTC ) |
page | number | No | The page number to retrieve. Must be a positive integer. (default: 1 ) |
limit | number | No | The number of users to return per page. Must be between 1 and 1000. (default: 50 , max: 1000 ) |
Pagination
Pagination is automatically applied to all requests with the following defaults:- Default page: 1
- Default limit: 50 users per page
- Maximum limit: 1000 users per page
Time Format Details
- ISO 8601 Format: Use
YYYY-MM-DDThh:mm:ss.SSS
format (e.g.,2025-06-23T10:29:26.074
) - IANA Timezone: Standard timezone identifiers like
America/New_York
,Asia/Tokyo
,Asia/Kolkata
- Default Timezone: UTC is used when timezone parameter is not provided
- Time Range: Both start and end timestamps are optional; you can filter by start time only, end time only, or both
Example Requests
- Basic Request (returns first 50 users):
- With Time Range and Timezone:
- With Pagination:
- With All Parameters:
Response
Error Responses
Status Code | Error Message | Description |
---|---|---|
400 | ”Invalid timezone format.” | Invalid IANA timezone identifier provided |
400 | ”Invalid timestamp format.” | Invalid start or end timestamp format |
401 | ”Authentication failed.” | Invalid or missing API key |
404 | ”Resource not found.” | Campaign does not exist in the project |
422 | ”Required parameter missing.” | Missing required display_id parameter |
422 | ”Invalid page number ''. Page must be a positive integer…” | Page parameter is not a positive integer |
422 | ”Invalid limit ''. Limit must be between 1 and 1000…” | Limit parameter is not between 1 and 1000 |
422 | ”Limit exceeds maximum allowed value of 1000…” | Limit exceeds 1000 |
TypeScript Types
Notes
- All timestamps are in ISO 8601 format.
- The
device_data
object contains detailed information about the user’s device. - The
active
field in the campaign data indicates whether the campaign is currently active. - The
attributed_users
field in the campaign data shows the number of users attributed to that campaign. - User data provided in this documentation is randomized for privacy reasons. Actual API responses will contain real user data.
- The TypeScript types provided are based on the example responses