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 7 characters when left out

title?string
Lengthlength <= 200
description?string
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
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)

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

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
title*string|null
description*string|null
ogImageUrl*string|null
folderId*string|null
tags*array<>
redirectType*number
passQuery*boolean
openInApp*boolean
openInBrowser*boolean
utm*|null
geoRules*array<>
deviceRules*array<>
expiresAt*|null
expiredUrl*string|null
abTest*|null
hasPassword*boolean
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",  "title": "string",  "description": "string",  "ogImageUrl": "string",  "folderId": "string",  "tags": [    {      "id": "string",      "name": "string",      "color": "string"    }  ],  "redirectType": 0,  "passQuery": 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,  "createdAt": "string",  "updatedAt": "string"}