Links

Create a link

POST
/v1/links

Authorization

apiKey
headerAuthorizationBearer <token>

Request Body

  1. body
url*string

Where the link sends people

Formaturi
slug?string

The part after the domain (letters, digits, - and _; case-sensitive). Random 5 characters when left out

note?string

Your own label for the link, shown in your links list; visitors never see it

Lengthlength <= 500
title?string

Social preview title. Setting any of title, description or ogImageUrl replaces the destination’s own preview with yours

Lengthlength <= 200
description?string

Social preview description

Lengthlength <= 500
ogImageUrl?|

Image for social previews

folderId?|

A folder id from GET /v1/folders; null = no folder

tagIds?array<string>

Tag ids from GET /v1/tags; replaces the link’s tags

redirectType?|||

HTTP redirect status; 302 by default

Default302
passQuery?boolean

Forward the short link’s query string to the destination

Defaultfalse
passPath?boolean

Prefix link: the short link also answers deeper paths and adds them to the destination. With slug order and destination https://acme.com/order, go.acme.com/order/42 goes to https://acme.com/order/42. App Store and Play Store targets are left as they are

Defaultfalse
openInApp?boolean

On phones, open the destination in its app (Basic and up)

Defaultfalse
openInBrowser?boolean

Android in-app browsers hand the destination to the default browser (Basic and up)

Defaultfalse
utm?

UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well

geoRules?array<>

A different destination per country (Basic and up)

Default[]
deviceRules?array<>

A different destination per device (Basic and up). On a domain with deep links, phones without the app go to the domain’s App Store or Google Play page unless the link has its own rule for that phone

Default[]
expiresAt?|

ISO date-time after which the link stops redirecting (Basic and up)

expiredUrl?|

Where an expired link sends people

abTest?|

A/B test on the destination; variants[0] is the link’s own url (Pro)

password?|

Visitors must enter it first (Basic and up). Only a hash is stored; null removes it

qrTemplateId?|

The QR brand template its QR code wears, an id from GET /v1/qr-templates; null = none, the plain code. Left out when creating: the domain’s template, else the one whose sites include the destination, else the workspace default

qrStyle?|

QR style settings this link changes on top of its template (dot and corner shapes, colours, logo, margin, outline); null = none. Refused when the result would not scan

domain?string

Host of one of your domains; the workspace subdomain when left out

Response Body

Response for status 201

application/json
  1. response
id*string
domain*string
slug*string
shortLink*string
url*string
note*string|null
title*string|null
description*string|null
ogImageUrl*string|null
folderId*string|null
tags*array<>
redirectType*number
passQuery*boolean
passPath*boolean
openInApp*boolean
openInBrowser*boolean
utm*|null
geoRules*array<>
deviceRules*array<>
expiresAt*|null
expiredUrl*string|null
abTest*|null
hasPassword*boolean
qrTemplateId*|

Its QR brand template; null = the plain code

qrStyle*|

QR style settings it changes on top of its template

createdAt*string

ISO 8601 date-time

updatedAt*string

ISO 8601 date-time

curl -X POST 'https://api.tinbo.co/v1/links' \  -H 'Content-Type: application/json' \  -d '{  "url": "http://example.com"}'
{  "id": "string",  "domain": "string",  "slug": "string",  "shortLink": "string",  "url": "string",  "note": "string",  "title": "string",  "description": "string",  "ogImageUrl": "string",  "folderId": "string",  "tags": [    {      "id": "string",      "name": "string",      "color": "string"    }  ],  "redirectType": 0,  "passQuery": true,  "passPath": true,  "openInApp": true,  "openInBrowser": true,  "utm": {    "property1": "string",    "property2": "string"  },  "geoRules": [    {      "country": "string",      "url": "string"    }  ],  "deviceRules": [    {      "device": "string",      "url": "string"    }  ],  "expiresAt": "string",  "expiredUrl": "string",  "abTest": {    "variants": [      {        "url": "string",        "weight": 0      }    ],    "endsAt": "string"  },  "hasPassword": true,  "qrTemplateId": "string",  "qrStyle": {    "dots": "square",    "eyeFrame": "square",    "eyeBall": "square",    "color": "string",    "eyeColor": "string",    "background": "string",    "logo": true,    "logoSize": 0.15,    "margin": 2,    "outline": "none",    "outlineColor": "string"  },  "createdAt": "string",  "updatedAt": "string"}