The Zlinkk API

Zlinkk is the most widely trusted link management platform in the world. By using the Zlinkk API, you will exercise the full power of your links through automated link customization, mobile deep linking, and click analytics.

While shortening links is Zlinkk’s most basic functionality, our customers create and distribute links at scale via integrated apps and SMS-Mail by utilizing the Zlinkk API.

What you need to get started

  • A Zlinkk account. Have access to an account and check your plan's link limits.

Shorten your first link!

  1. Generate an access token.
  2. You'll use the POST method to the https://zlinkk.com/api/v1/shorten. Append your access token as a header in your request. Here's an example: Authorization: Bearer {token}.
     



    "title": "Ba1bc23dE4F", 
    "domain": "ppl.la", 
    "link": "https://dev.zlinkk.com/" 


PHP

$curl = curl_init();

curl_setopt_array($curl, array(

  CURLOPT_URL => 'https://zlinkk.com/api/v1/shorten',

  CURLOPT_RETURNTRANSFER => true,

  CURLOPT_ENCODING => '',

  CURLOPT_MAXREDIRS => 10,

  CURLOPT_TIMEOUT => 0,

  CURLOPT_FOLLOWLOCATION => true,

  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

  CURLOPT_CUSTOMREQUEST => 'POST',

  CURLOPT_POSTFIELDS => array('link' => 'https://zlinkk.com','title' => 'Test Title Api','domain' => 'ppl.la'),

  CURLOPT_HTTPHEADER => array(

    'Authorization: Bearer //API Key'

  ),

));

$response = curl_exec($curl);

curl_close($curl);
print_r($response);



.NET

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;

namespace URLShortenerExample
{
   class Program
   {
       static async Task Main(string[] args)
       {
           var url = "https://zlinkk.com/api/v1/shorten";
           var apiKey = "Your_API_Key"; // API Key

           var body = new List<KeyValuePair<string, string>>
           {
               new KeyValuePair<string, string>("link", "https://zlinkk.com"),
               new KeyValuePair<string, string>("title", "Test Title Api"),
               new KeyValuePair<string, string>("domain", "ppl.la")
           };

           using (var httpClient = new HttpClient())
           {
               httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");

               try
               {
                   var response = await httpClient.PostAsync(url, new FormUrlEncodedContent(body));
                   response.EnsureSuccessStatusCode(); // Errros message

                   var responseBody = await response.Content.ReadAsStringAsync();
                   Console.WriteLine(responseBody);
                   Console.ReadLine();
               }
               catch (HttpRequestException ex)
               {
                   Console.WriteLine("İstek hatası: " + ex.Message);
                   Console.ReadLine();
               }
           }
       }
   }
}


Python


import requests

url = 'https://zlinkk.com/api/v1/shorten'
api_key = 'Your_API_Key'  # API Key

headers = {
   'Authorization': f'Bearer {api_key}',
   'Content-Type': 'application/json',
}

data = {
   'link': 'https://zlinkk.com',
   'title': 'Test Title Api',
   'domain': 'ppl.la',
}

try:
   response = requests.post(url, json=data, headers=headers)
   response.raise_for_status()  # Errros message

   print(response.json())
except requests.exceptions.RequestException as ex:
   print("Errros message:", ex)



Java


import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;

public class URLShortenerExample {
   public static void main(String[] args) throws IOException {
       String url = "https://zlinkk.com/api/v1/shorten";
       String apiKey = "Your_API_Key"; // API Key

       String data = "{\"link\": \"https://zlinkk.com\", \"title\": \"Test Title Api\", \"domain\": \"ppl.la\"}";
       byte[] postData = data.getBytes(StandardCharsets.UTF_8);

       HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
       conn.setRequestMethod("POST");
       conn.setRequestProperty("Authorization", "Bearer " + apiKey);
       conn.setRequestProperty("Content-Type", "application/json");
       conn.setDoOutput(true);

       try (OutputStream os = conn.getOutputStream()) {
           os.write(postData);
       }

       if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
           java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(conn.getInputStream()));
           String inputLine;
           StringBuilder response = new StringBuilder();
           while ((inputLine = in.readLine()) != null) {
               response.append(inputLine);
           }
           in.close();
           System.out.println(response.toString());
       } else {
           System.out.println("Errros message: " + conn.getResponseMessage());
       }
   }
}

A file icon for cookie use. use of cookies This web page is designed to give you a better user experience. uses cookies. From Zlinkk services Please confirm the Use of Cookies to take advantage of it.
Review cookie usage
Zlink logo, which includes Zlink characters and an emblem in a dark version. Zlink logo, which includes Zlink characters and an emblem in a light version.
Login