WarpLink Analytics API
The Analytics API from WarpLink, for analytics.
The Analytics API from WarpLink, for analytics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/warplink-app:warplink-app-analytics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: WarpLink Analytics API
version: 1.0.0
description: 'Link infrastructure API for developers and small teams: deep linking, install attribution, and analytics.'
servers:
- url: https://api.warplink.app/v1
description: Production
- url: http://localhost:3000/api/v1
description: Development
security:
- bearerAuth: []
tags:
- name: Analytics
paths:
/analytics:
get:
operationId: queryAnalytics
summary: Answer an analytics question
description: 'Reads one of seven analytics surfaces through the same authorized query service the dashboard and the MCP query_analytics tool use: overview, one link''s detail, a breakdown of one dimension (explore), a comparison of 2-5 links (change), and the analytics page''s own signals, summary (KPIs, headline sentence, top movers, spike flag), trend (the chart series by hour, day or week with the previous period aligned bucket by bucket) and leaderboard (links by change, new links, active links with no taps). Requires an API key with the analytics:read or links:read scope. SDK keys are refused. Retention, the Free plan''s 30-day look-back and the Free click-limit freeze apply exactly as on the dashboard. A Free range, or a comparison whose earlier period, that starts before the last 30 days is refused with 403 LOOKBACK_EXCEEDED, and details.earliest_allowed carries the first instant a Free organization may read. A Free organization at its 10,000-click limit still reads: figures stop at the moment the limit was reached, receipt.paused is { reached_at, limit }, window_effective.until is one millisecond after that moment (or at it, when another click shares that millisecond, and then the clicks in that millisecond are left out), and a warning says so. Clicks keep being stored, and a new billing period reads live again. Reports accepted_taps, unique_clicks, installs (observed_attributed_installs, or linked_installs when a filter or own_links scope narrows the view) and, on summary and trend, tap_to_install_rate and app_open_share as numerator and denominator. Days, weeks and hours are labeled in the organization''s reporting time zone unless timezone is sent. metrics optionally narrows the response to a subset of a surface''s own metrics. app_id filters every surface to links of one app in the org. On the overview surface the rows also carry the top countries, referrers and devices, idle links, recent clicks and the previous-period comparison row, and attempt_match_rate is reported with an additive tap_found object ({ numerator, denominator, display, status }): the match rate among new installs where a tap was found, with status healthy (80% or more), needs_attention (50% to under 80%), low (under 50%), or not_enough_installs (fewer than 50 such installs); on the link surface the tap-source split; on change the per-compared-link breakdowns. A parameter not applicable to the chosen surface, and any unrecognized query parameter, is a 400 VALIDATION_ERROR. A parameter other than filter sent more than once is also a 400 VALIDATION_ERROR, and so is org: the API key''s own organization is always the one queried. On the leaderboard surface, insight.silent_through and insight.silent_state say whether silence can be claimed for the silent tab. A sparkline point that cannot be computed, such as a rate with no denominator, is null.'
tags:
- Analytics
parameters:
- name: surface
in: query
required: true
schema:
type: string
enum:
- overview
- link
- explore
- change
- summary
- trend
- leaderboard
description: Which question to answer.
- name: window_preset
in: query
required: false
schema:
type: string
enum:
- last_7_days
- last_30_days
- this_month
- previous_month
description: A relative window. Omit and pass from/to instead for an explicit range.
- name: from
in: query
required: false
schema:
type: string
format: date-time
description: Start of an explicit window, inclusive. Required together with to when window_preset is omitted.
- name: to
in: query
required: false
schema:
type: string
format: date-time
description: End of an explicit window, exclusive.
- name: timezone
in: query
required: false
schema:
type: string
description: IANA timezone that labels every day, week and hour and resolves this_month/previous_month. Defaults to the organization's reporting time zone (Settings), else UTC.
- name: link_id
in: query
required: false
schema:
type: string
format: uuid
description: Required when surface=link.
- name: link_ids
in: query
required: false
schema:
type: string
description: Comma-separated link ids (2-5 distinct). Required when surface=change.
- name: dimension
in: query
required: false
schema:
type: string
enum:
- country
- device
- os
- browser
- referrer
- utm_source
- source
- app
- ai_assistant
description: Required when surface=explore, unless dimensions is sent. Exactly one dimension name. Send dimension or dimensions, not both. `ai_assistant` groups clicks by the AI assistant (such as ChatGPT or Claude) whose referrer host or utm_source they carry. A click no assistant matches is Unknown.
- name: dimensions
in: query
required: false
schema:
type: string
enum:
- country
- device
- os
- browser
- referrer
- utm_source
- source
- app
- ai_assistant
description: Required when surface=explore, unless dimension is sent. Exactly one dimension name; the plural form is the canonical shape but only one value is accepted today. Send dimension or dimensions, not both. `ai_assistant` groups clicks by the AI assistant whose referrer host or utm_source they carry.
- name: metrics
in: query
required: false
schema:
type: string
description: Comma-separated subset of the surface's own metric list (e.g. metrics=accepted_taps,unique_clicks). Omit for every metric the surface reports. A name outside the surface's own list is a 400 VALIDATION_ERROR.
- name: filter
in: query
required: false
style: form
explode: true
schema:
type: array
items:
type: string
description: 'Repeatable filter, one token per value. Two spellings are accepted. Plain, dimension:value (filter=country:US): an empty value (country:) selects Unknown, repeating the parameter for one dimension matches any of its values (filter=country:US&filter=country:DE, at most 25 values per dimension), and different dimensions combine with AND. Typed, dimension:operator[:payload]: eq (filter=country:eq:US, the value after the second colon is taken exactly as given, including any further colons, commas or percent signs, e.g. filter=utm_source:eq:partner:summer keeps the whole value ''partner:summer''), is_unknown (filter=country:is_unknown, no payload) and in (a true OR of 2-5 comma-separated values, filter=utm_source:in:google,bing; a value that itself contains a comma, colon, percent sign or non-ASCII text must be percent-encoded with encodeURIComponent before joining the list, e.g. filter=utm_source:in:a%2Cb,plain for the two values ''a,b'' and ''plain''; a malformed percent-escape is a 400 VALIDATION_ERROR, never silently dropped or truncated). A token whose second segment is a valid typed operator reads as typed. At most one in filter per request, and none together with compare. Accepted on explore, summary, trend and leaderboard. The `ai_assistant` dimension takes an assistant id as its value: chatgpt, perplexity, claude, gemini, copilot, meta_ai, grok, deepseek, le_chat, you or phind. `ai_assistant:` with no value, or `ai_assistant:is_unknown`, selects the clicks no assistant sent.'
- name: app_id
in: query
required: false
schema:
oneOf:
- type: string
format: uuid
- type: string
enum:
- none
description: Three states. Omit for every link regardless of app (unfiltered, the default). A UUID filters every surface to links of that one app in the org (404 if the app does not exist in this org). The literal string "none" selects only links with no app at all. On summary, trend and leaderboard it is the same as a filter on the app dimension, so it cannot be sent together with one.
- name: compare
in: query
required: false
schema:
type: string
enum:
- previous
- none
- 'true'
- 'false'
description: Also read the equal-length period just before (previous, or true) or not (none, or false). Defaults to previous on summary, trend and leaderboard and to none on explore. Not accepted on overview, link and change.
- name: granularity
in: query
required: false
schema:
type: string
enum:
- hour
- day
- week
description: summary, trend, leaderboard, and explore with row_series=true. Chart bucket size. hour needs a window of at most 7 days, week at least 14 days; day always works. A refused choice is a 400 INVALID_GRANULARITY naming the limit. Defaults to day.
- name: metric
in: query
required: false
schema:
type: string
enum:
- taps
- unique
- installs
- install_rate
- app_share
description: trend only. The KPI the caller is asking about, echoed in the response. Every metric is returned on every row.
- name: tab
in: query
required: false
schema:
type: string
enum:
- movers
- new
- silent
description: leaderboard only. movers lists links by change, new lists links created in the window, silent lists active links with no taps under the same filters. Defaults to movers.
- name: search
in: query
required: false
schema:
type: string
maxLength: 100
description: explore only. Literal text matched against a row's value or app name; % and _ are ordinary characters. With limit it also sets how many named rows are listed.
- name: row_series
in: query
required: false
schema:
type: boolean
description: explore only. Add each row's share of the scan, previous count, change and sparkline.
- name: cursor
in: query
required: false
schema:
type: string
description: An opaque cursor from a prior response. Reauthorized against the current request; a stale or mismatched cursor is refused.
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 50
description: Page size.
responses:
'200':
description: 'The query result: schema_version, the query receipt, totals/units, rows, and next_cursor'
content:
application/json:
schema:
type: object
'400':
description: Invalid request (unknown surface, missing window, a filter or granularity the surface can't honor)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden (including a link outside a member's own_links scope) or missing scope. A Free organization that asks for a range, or a comparison, starting before its last 30 days gets LOOKBACK_EXCEEDED, with details.subject (range or comparison), details.lookback_days and details.earliest_allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found (a link outside the org, or a nonexistent link/org)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
description: 'A stable machine-readable code. 403 `SDK_KEY_ROUTE_FORBIDDEN` means an SDK key was used on an endpoint that is not an SDK endpoint, or on the MCP server. Use an API key for that request. 400 `RECOVERY_TOKEN_INVALID` and `RECOVERY_TOKEN_EXPIRED` mean the referral token sent to `POST /v1/attribution/match` was refused. 503 `RECOVERY_TOKEN_PENDING` means the token is genuine but was issued moments ago and its invitation has not arrived yet: retry after the `Retry-After` delay.'
example: NOT_FOUND
message:
type: string
example: Link not found
details:
type: object
properties:
fields:
type: array
items:
type: object
properties:
field:
type: string
message:
type: string
subject:
type: string
enum:
- range
- comparison
description: 'On LOOKBACK_EXCEEDED: whether the requested range or its comparison period starts too early.'
lookback_days:
type: integer
description: 'On LOOKBACK_EXCEEDED: how many days back the plan reads.'
earliest_allowed:
type: string
format: date-time
description: 'On LOOKBACK_EXCEEDED: the first instant the plan may read.'
fix:
type: string
description: What to do next, in one imperative sentence. Present on every code in the error reference. Apply it before you retry.
docs_url:
type: string
format: uri
description: The code's row in the error reference, for example `https://warplink.app/docs/errors#sdk_key_route_forbidden`.
retry_after:
type: integer
description: 'On AGENT_SIGNUP_RATE_LIMITED: seconds to wait before the next call. The `Retry-After` header carries the same number.'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'An API key for the REST endpoints, or an SDK key for the SDK and attribution endpoints. Both are `wl_live_` for Production or `wl_test_` for Test mode, followed by 32 alphanumeric characters. The prefix decides the environment: a `wl_test_` key reads and writes Test data only, and a `wl_live_` key reads and writes Production data only. A Production id sent with a Test key answers 404 `NOT_FOUND`. A Test key on an endpoint that manages the organization itself answers 403 `ENVIRONMENT_NOT_SUPPORTED`. Only an SDK key can record install attribution. An SDK key can call only `GET /v1/sdk/validate`, `GET /v1/links/resolve/{slug}`, `POST /v1/attribution/match`, and `POST /v1/referrals/claims`. Any other endpoint answers it with 403 `SDK_KEY_ROUTE_FORBIDDEN`: use an API key for that request.'