Deep Blue Links
Documentation menu

Get the link that led to an install

POST/api/links/check-deferred

Call it on the app's first launch after an install to get the link the user opened before installing. Send the device's IANA timezone, and on iOS also device: the screen's width and height in pixels (points times the screen scale) and the language. It answers with the link when it can tell which of the app's links the user opened in the hour before the launch, and 404 when it can't. On Android, read the link value from the Play install referrer and call POST api/links/resolve instead: that match is exact. A sandbox link's response carries isSandbox: true; other links' responses don't have the field.

Request

Send your app’s API key in the Api-Key header. See Authentication.

Body

timezonestringrequired

The device’s IANA timezone, such as America/Chicago.

at least 1 character

deviceobject (DeviceRequest)optional

The device’s screen and language. Send it whenever your platform reports them; its three fields are then all required.

screenWidthnumberrequired

The screen’s width in physical pixels: points times the screen scale.

1 to 65535

screenHeightnumberrequired

The screen’s height in physical pixels.

1 to 65535

languagestringrequired

The device’s language, such as en or en-US. Only the primary subtag is compared.

at most 64 characters

Response

200 with this body. For errors, see Errors.

idinteger

The link’s id.

longUrlstring or null

The link’s full URL. Route your app by its path and query.

shortUrlstring or null

The link’s short URL.

isSandboxboolean

true for a sandbox link. Live links’ responses leave the field out.

Example response
{
  "id": 1001,
  "longUrl": "https://demo.dev.thedbl.ink/products/1234",
  "shortUrl": "https://demo.dev.thedbl.ink/Xy3kP9aQ"
}

Example

curl
curl -X POST 'https://dev.thedbl.ink/api/links/check-deferred' \
  -H 'Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "timezone": "America/Chicago",
  "device": {
    "screenWidth": 1179,
    "screenHeight": 2556,
    "language": "en"
  }
}'

Try it

Sends a real request to https://dev.thedbl.ink from your browser. Use your app’s sandbox API key, which starts with sandbox_, while you try things out. A call uses up the clicks it matches, so they aren’t returned again.

https://dev.thedbl.ink/api/links/check-deferred