API Docs

Create URL

Create URL by sending POST data in json format to REST API endpoint: /api/v1/urls


Parameter Type Position # Description
apikey string Header Required Enter your 20-characters unique api key.
apisecret string Header Required Enter your 12-characters unique api secret.
Content-Type string Header Required application/json
destination string Body Required The destination URL that you want to transform into short URL.
slashtag string Body Optional The keyword for your branded short URL. Max: 100 characters
redirect_code string Body Optional HTTP redirect codes (301, 302, 303, 304, 307, or 308). Default is 301
password string Body Optional Password to protect URL and default is no password. Max: 50 characters
domain_id integer Body Optional ID of branded short domain. Default is 0 (no branded domain)
tag_id integer Body Optional ID of tag. Default is 0 (no tag)
expires_after integer Body Optional
(Strongly Recommended)
Number of days (URL will expire after X number days from today). Default is 0 (URL will never expire). Max: 3650

Sample post-data json


Usage of "expires_after":
If you create your short URL at 2021-10-25 01:20:30 and set expires_after as 30 (means 30 days), then your short URL will expire at 2021-11-24 01:20:30


    "status": 200,
    "message": "ok",
    "data": {
        "id": 114,
        "destination": "https://t2mio.com/blog/google-url-shortener-goo-gl-shutting-down/",
        "hits": 0,
        "redirectCode": 301,
        "shortUrl": "http://google.com/googl_t2m",
        "slashtag": "googl_t2m",
        "password": "Yes",
        "createdAt": "2018-06-16 06:49:52"
    "status": 400,
    "message": "Bad request. <detailed-msg-will-go-here.>",
    "data": []