WarpLink Attribution API
The Attribution API from WarpLink, for attribution.
The Attribution API from WarpLink, for attribution.
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-attribution-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 Attribution 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: Attribution
paths:
/attribution/match:
post:
operationId: attributionMatch
summary: Match an app install to a link click
tags:
- Attribution
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- platform
- fingerprint_version
- sdk_version
properties:
fingerprint:
type: string
pattern: ^[a-fA-F0-9]{64}$
description: Pre-computed SHA-256 hex string built from device signals, case-insensitive. Optional; SDKs use the raw-signals path instead.
platform:
type: string
enum:
- ios
- android
fingerprint_version:
type: string
enum:
- basic
- enriched
- enriched_tz
description: Which match variant the SDK's signals support. `enriched_tz` uses the IANA zone, `enriched` the minute offset, `basic` neither.
sdk_version:
type: string
minLength: 1
maxLength: 32
device_id:
type: string
format: uuid
description: 'The IDFV, sent only by the iOS SDK. Not an install match on its own: it finds an install this device already has and returns it with that install''s original match type, confidence, and match_guaranteed, so it never turns a probabilistic match into a guaranteed one. Checked before the probabilistic match, and skipped when is_reinstall is true.'
referrer:
type: string
format: uuid
description: The WarpLink link ID carried in the Play install referrer as utm_content. Send the parsed link ID, not the raw referrer string. Deterministic match; takes precedence over the probabilistic match.
accept_language:
type: string
description: Raw device preferred language (e.g. "en-US"). Required for the probabilistic path. The server normalizes it to the primary subtag.
timezone_offset:
type: integer
description: Timezone offset in minutes, JS getTimezoneOffset() convention (UTC+2 is -120). Sent alongside `timezone`; used as the fallback when no IANA zone is available.
timezone:
type: string
minLength: 1
maxLength: 64
description: 'IANA timezone name, e.g. `America/Toronto`. Preferred over `timezone_offset`: it carries far more entropy and does not shift at a daylight-saving boundary. Sent by SDK versions that collect a zone name; older SDKs send the offset only.'
app_bundle_id:
type: string
minLength: 1
maxLength: 255
description: iOS bundle identifier of the calling app. Optional. Without it an install is matched across the whole organization, which is ambiguous once the organization has more than one app.
app_package_name:
type: string
minLength: 1
maxLength: 255
description: Android package name of the calling app. Optional. Without it an install is matched across the whole organization, which is ambiguous once the organization has more than one app.
is_reinstall:
type: boolean
description: 'True when this device already completed WarpLink attribution for this app under an earlier install. A reinstall counts as an install and is attributed again on every platform, and the flag is more than a label: `true` makes the server skip the device ID (IDFV) branch, so the install is matched by the probabilistic tier instead, and it stops the referrer branch from answering with the earlier install''s row. Optional, and absent means false: SDKs older than the field never send it.'
recovery_token:
type: string
minLength: 1
maxLength: 256
description: 'The referral token an invitation link carried to the install: read from the clipboard on iOS, from the `wl_rt` install referrer on Android. Send it exactly as received. Checked before every other signal. One token claims one install: the same device asking again gets the same result with `replay_state` `original`, any other device gets the first install''s result with `replay_state` `replayed`. A token the link-open call returned (no tap behind it) is not an install and is ignored here. A token that is malformed, changed, or issued to another app answers 400 `RECOVERY_TOKEN_INVALID`; an expired one answers 400 `RECOVERY_TOKEN_EXPIRED`. Both answer 400 only when the token is the request''s sole signal; with another signal present the request falls through to it. A token that is genuine and unexpired but not readable yet (it was issued in the last few minutes) answers 503 `RECOVERY_TOKEN_PENDING` with a `Retry-After` header, again only when the token is the request''s sole signal: retry the same call with the same token. A genuine token still unreadable after those minutes answers 400 `RECOVERY_TOKEN_INVALID`.'
attempt_number:
type: integer
minimum: 1
description: 'How many launches of this install have sent a deferred check, counting this one. An SDK counts a launch that sent a request, not a retry inside one launch. Optional: SDK versions before 1.4.0 send nothing. The server ignores a value that is not a whole number of 1 or more, and the request still succeeds. The server logs it and does not store it.'
install_referrer:
type: string
description: The raw Google Play install referrer, for an Android install that carries no link ID or referral token. The server keeps the first 512 characters and ignores an empty or invalid value, and the request still succeeds. The server reads it only to tell an organic install apart (`utm_source=google-play&utm_medium=organic`, or both values `(not set)`), for an app that turned on `skip_raw_for_organic_play_installs`. It never matches an install by itself. Optional.
anyOf:
- required:
- recovery_token
- required:
- fingerprint
- required:
- referrer
- required:
- device_id
- required:
- accept_language
- timezone_offset
responses:
'200':
description: Attribution result
content:
application/json:
schema:
oneOf:
- type: object
required:
- matched
- match_type
- match_confidence
- match_guaranteed
- link_id
- deep_link_url
- destination_url
- custom_params
- install_id
- app_id
- attribution_id
- match_method
- evidence_class
- replay_state
- captured_params
- tapped_at
properties:
matched:
type: boolean
const: true
match_type:
type: string
enum:
- deterministic
- probabilistic
match_confidence:
type: number
minimum: 0
maximum: 1
match_guaranteed:
type: boolean
description: 'True only for a deterministic match, which the Play Install Referrer and a recovery token produce. A device ID answer carries the flag of the install it returns, so it is true for an install a recovery token claimed and false for an estimated one. It is not a credential: use it, like match_confidence, to choose the destination the attribution result routes to. Authenticate the user before revealing private data or performing sensitive actions, whether or not the match was guaranteed.'
link_id:
type: string
format: uuid
description: 'The link this install is attributed to. A matched response always names one: an install whose link has since been deleted is reported as no match, never as a match you cannot act on.'
deep_link_url:
type:
- string
- 'null'
description: The deep link for the platform that asked, or null when that platform has none. Route on `deep_link_url ?? destination_url`.
destination_url:
type: string
format: uri
description: Where to send the user. Always present on a matched response.
custom_params:
type: object
additionalProperties: true
install_id:
type: string
format: uuid
app_id:
type:
- string
- 'null'
format: uuid
attribution_id:
type: string
format: uuid
description: The id of the attribution this answer came from. The same value as `install_id`.
match_method:
type: string
enum:
- install_token
- android_referrer
- referrer
- device_id
- link_open
- probabilistic
description: How the install was matched. `install_token` is a recovery token that reached an iOS app, or one from the team's own page. `android_referrer` is a recovery token that reached an Android app through the Play install referrer, and its evidence_class is exact. `referrer` is a link ID alone from the Play install referrer, and its evidence_class is legacy_link. `device_id` is a device that already had an install, `link_open` an open of the link in an app that was already installed, `probabilistic` an estimated match. Installs recorded before this field existed report `referrer` when they were deterministic and `probabilistic` when they were not. GET /installs returns the same value for the same install.
evidence_class:
type: string
enum:
- exact
- estimated
- legacy_link
description: How strong the match is. `exact` came from a token the link issued to this install. `estimated` is an estimated match from device signals. `legacy_link` is a link-ID match recorded before recovery tokens existed. A replay keeps the class of the first install and never raises it.
replay_state:
type: string
enum:
- original
- replayed
description: '`original` for the first answer to an installation and for the same installation asking again. `replayed` when the answer repeats an earlier install, for example a second device using a token that already claimed one. It never changes `evidence_class`.'
captured_params:
type: object
additionalProperties: true
description: The custom parameters the link carried at the tap. The same object as `custom_params`.
tapped_at:
type:
- string
- 'null'
format: date-time
description: When the link was tapped, or null for an install recorded without a tap time.
tether:
$ref: '#/components/schemas/TetherAnswer'
sdk_policy:
$ref: '#/components/schemas/SdkPolicy'
- type: object
required:
- matched
properties:
matched:
type: boolean
const: false
tether:
$ref: '#/components/schemas/TetherAnswer'
sdk_policy:
$ref: '#/components/schemas/SdkPolicy'
'400':
description: 'Validation error, or a refused referral token. The error code is `VALIDATION_ERROR`, `RECOVERY_TOKEN_INVALID` (the token is malformed, was changed, belongs to another app, or still could not be confirmed a few minutes after it was issued) or `RECOVERY_TOKEN_EXPIRED` (the token ran out, or the link behind it is paused or has ended). A genuine token issued moments ago that cannot be read yet is not a 400: it answers 503 `RECOVERY_TOKEN_PENDING`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden. The key is missing the attribution:write scope, or it is an SDK key tied to a different app (code `KEY_APP_MISMATCH`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: 'Service temporarily unavailable. Retry after the delay in the Retry-After header. A referral token that is genuine but not readable yet answers 503 `RECOVERY_TOKEN_PENDING` with a `Retry-After` header: send the same call again with the same token.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/attribution/attempts:
get:
operationId: listAttributionAttempts
summary: List attribution attempts
description: 'Lists every attribution attempt of the organization, matched or not, newest first. An attempt is one request from an SDK asking which click led to an install. Use it to see why installs were not tied to a click: fail_reason names the reason (no_signals, no_match, no_candidates, candidates_filtered, candidates_claimed, scored_zero, key_app_mismatch), and it is also set to ambiguous_app on a matched attempt that looked up a device-wide signal across several apps. match_source is claim when the attempt created an install and replay when it answered from an existing one, so the claims equal the records of GET /installs. No IP address, match key or device id is stored on an attempt or returned; ip_class says only whether the request came from a carrier-grade NAT, IPv4 or IPv6 address. Requires an API key with the analytics:read or links:read scope. SDK keys are refused with 403 SDK_KEY_ROUTE_FORBIDDEN. Attempts are filtered by created_at: from is inclusive and to is exclusive. Retention and the Free plan''s 30-day look-back apply: a Free organization whose from is earlier than the last 30 days gets 403 LOOKBACK_EXCEEDED with details.earliest_allowed, and a from earlier than the plan''s data retention is raised to it. The list is not frozen when a Free organization reaches its click limit. Attempts carry no link, so there is no link_id filter, and a member limited to their own links is refused. Page with pagination.next_cursor and send the same filters with it. A parameter this endpoint does not accept is a 400 VALIDATION_ERROR.'
tags:
- Attribution
parameters:
- name: app_id
in: query
required: false
schema:
oneOf:
- type: string
format: uuid
- type: string
enum:
- none
description: Omit to read attempts of every app. A UUID reads one app. The literal "none" reads only attempts with no app.
- name: matched
in: query
required: false
schema:
type: boolean
description: true reads only attempts that matched, false only attempts that did not. Omit to read both.
- name: from
in: query
required: false
schema:
type: string
format: date-time
description: Start of the window, inclusive, as an ISO instant with an offset. Without it the list starts at the earliest instant your plan may read.
- name: to
in: query
required: false
schema:
type: string
format: date-time
description: End of the window, exclusive, as an ISO instant with an offset. Defaults to now. Must be after from.
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 100
description: Records per page, 1 to 500.
- name: cursor
in: query
required: false
schema:
type: string
maxLength: 256
description: The next_cursor of the previous page. Send it with the same filters. A cursor from the other list is refused with 400 CURSOR_INVALID.
responses:
'200':
description: One page of attribution attempts
content:
application/json:
schema:
type: object
required:
- data
- pagination
- window
properties:
data:
type: array
items:
$ref: '#/components/schemas/AttributionAttempt'
pagination:
$ref: '#/components/schemas/CursorPagination'
window:
$ref: '#/components/schemas/ExportWindow'
'400':
description: 'Invalid query: an unknown or repeated parameter, a value of the wrong type, a from that is not before to (VALIDATION_ERROR), or a cursor that does not belong to this list (CURSOR_INVALID)'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden. An SDK key, a key without the analytics:read or links:read scope, or a Free organization whose from is earlier than its last 30 days (LOOKBACK_EXCEEDED, with details.earliest_allowed)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: No part of the requested window is within your plan's data retention (RETENTION_WINDOW_UNAVAILABLE)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
ExportWindow:
type: object
description: The window that was read.
required:
- from
- to
properties:
from:
type: string
format: date-time
description: Inclusive. Raised to the start of the plan's data retention when the request asked for older rows.
to:
type: string
format: date-time
description: Exclusive.
SdkPolicy:
type: object
description: How an SDK paces its deferred match calls. Present on every 200 answer of `POST /v1/attribution/match` and `GET /v1/sdk/validate`. SDKs ship these same values as built-in defaults, keep the last block they received, and clamp each value to the bounds below. A missing or invalid block leaves the defaults in place, so an SDK that never reads it behaves the same.
required:
- retry_delays_seconds
- give_up_after_seconds
- max_install_age_seconds
- raw_signal_max_install_age_seconds
properties:
retry_delays_seconds:
type: array
minItems: 1
items:
type: integer
minimum: 60
maximum: 604800
description: How long an SDK waits before its next check after a check that sent a request and got no answer. The first delay follows the first failure, the second the next, and the last repeats. Each value is 60 seconds to 7 days.
example:
- 900
- 3600
- 21600
- 86400
give_up_after_seconds:
type: integer
minimum: 3600
maximum: 2592000
description: How long after its first failed check an SDK stops checking for good. 1 hour to 30 days.
example: 259200
max_install_age_seconds:
type: integer
minimum: 86400
maximum: 31536000
description: An app installed longer ago than this makes no check. 1 day to 365 days.
example: 2592000
raw_signal_max_install_age_seconds:
type: integer
minimum: 3600
description: An app installed longer ago than this sends its check without raw device signals. 1 hour to `max_install_age_seconds`.
example: 172800
AttributionAttempt:
type: object
description: One attribution attempt, matched or not.
required:
- id
- platform
- strategy
- matched
- created_at
properties:
id:
type: string
pattern: ^[0-9]+$
description: Stable attempt id, a decimal string because the stored id is a 64-bit integer.
app_id:
type:
- string
- 'null'
format: uuid
description: The app the attempt came from. Null when it could not be determined, including every attempt before app ids were stored.
platform:
type: string
enum:
- ios
- android
sdk_version:
type:
- string
- 'null'
description: Self-reported by the SDK.
strategy:
type: string
description: 'The cascade branch that ran: token (a recovery token), referrer (a link ID alone), device_id, fingerprint (the probabilistic match), raw or none.'
matched:
type: boolean
match_source:
type:
- string
- 'null'
description: claim when the attempt created an install, replay when it answered from an existing one. Null on unmatched attempts and on attempts before this was stored.
match_method:
type:
- string
- 'null'
enum:
- referrer
- probabilistic
- null
description: 'An attempt names a method only when it created an install (match_source claim) through the referrer, fingerprint or raw strategy: referrer for the referrer strategy, probabilistic for fingerprint and raw. A token attempt is always null, as are replays, device_id answers and unmatched attempts, because an attempt stores neither the method nor the install it created. To see the method, read the install record.'
referral_id:
type: 'null'
description: Always null. An attempt stores no link to an install or a referral; the referral an install was credited as is on the install record.
evidence_class:
type:
- string
- 'null'
enum:
- exact
- estimated
- legacy_link
- null
description: How firm a matched answer was. Null on unmatched attempts and on attempts before the referral handoff.
replay_state:
type:
- string
- 'null'
enum:
- original
- replayed
- null
description: Whether a repeated token or tap was answered from the first answer. Null on unmatched attempts and on attempts before the referral handoff.
fail_reason:
type:
- string
- 'null'
description: Why the attempt did not match, or ambiguous_app on a matched attempt that looked up a device-wide signal across several apps. Null otherwise.
fingerprint_version:
type:
- string
- 'null'
description: The match variant the SDK declared. Null when no match key was sent.
tried_version:
type:
- string
- 'null'
description: The match variant the server tried last. Null when no probabilistic branch ran.
candidate_count:
type:
- integer
- 'null'
description: Clicks stored under the key the server tried, before any filter. Null when no probabilistic branch ran.
ip_class:
type:
- string
- 'null'
enum:
- cgnat
- ipv4
- ipv6
- null
description: The class of the requesting address. The address itself is never stored.
is_reinstall:
type:
- boolean
- 'null'
description: The SDK's own claim. Null when the SDK did not send it.
created_at:
type: string
format: date-time
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.'
TetherAnswer:
type: object
description: 'What the server did with the Tether code the request carried. Present only when the request sent `tether_code`. An older client that does not know a status keeps its `matched` handling: a `pending` answer is `matched: false` for the code, like `not_found`.'
required:
- status
- accepted
- test
- test_receipt
- retry_after_seconds
properties:
status:
type: string
enum:
- accepted
- not_found
- rejected
- test
- pending
description: '`accepted`: the code was used. `not_found`: the code is expired, gone or for an ended link. `rejected`: the code is not valid for this app or was used by another installation. `test`: a test code. `pending`: the code is genuine and was issued moments ago, but its tap record has not reached this region yet. Send the same request again after `retry_after_seconds`.'
accepted:
type: boolean
description: True when the server used the code. The SDK clears the clipboard only then.
test:
type: boolean
description: True when the code was a test code.
test_receipt:
type:
- string
- 'null'
description: Proof that a test code reached the server. Null for a live code.
retry_after_seconds:
type:
- integer
- 'null'
minimum: 1
description: 'Set only when `status` is `pending`: the seconds to wait before sending the same request again. Null otherwise.'
CursorPagination:
type: object
required:
- limit
- has_more
- next_cursor
properties:
limit:
type: integer
has_more:
type: boolean
next_cursor:
type:
- string
- 'null'
description: Send as cursor, with the same filters, to read the next page. Null on the last page.
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.'