curl --request POST \
--url https://app.utmkit.co/api/v1/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"android_url": "<string>",
"campaign_id": 123,
"destination": "<string>",
"domain": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ios_url": "<string>",
"note": "<string>",
"short_code": "<string>",
"tags": [
"<string>"
],
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"whatsapp_message": "<string>",
"whatsapp_number": "<string>"
}
'import requests
url = "https://app.utmkit.co/api/v1/links"
payload = {
"android_url": "<string>",
"campaign_id": 123,
"destination": "<string>",
"domain": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ios_url": "<string>",
"note": "<string>",
"short_code": "<string>",
"tags": ["<string>"],
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"whatsapp_message": "<string>",
"whatsapp_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
android_url: '<string>',
campaign_id: 123,
destination: '<string>',
domain: '<string>',
expires_at: '2023-11-07T05:31:56Z',
ios_url: '<string>',
note: '<string>',
short_code: '<string>',
tags: ['<string>'],
utm_campaign: '<string>',
utm_content: '<string>',
utm_medium: '<string>',
utm_source: '<string>',
utm_term: '<string>',
whatsapp_message: '<string>',
whatsapp_number: '<string>'
})
};
fetch('https://app.utmkit.co/api/v1/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.utmkit.co/api/v1/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'android_url' => '<string>',
'campaign_id' => 123,
'destination' => '<string>',
'domain' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z',
'ios_url' => '<string>',
'note' => '<string>',
'short_code' => '<string>',
'tags' => [
'<string>'
],
'utm_campaign' => '<string>',
'utm_content' => '<string>',
'utm_medium' => '<string>',
'utm_source' => '<string>',
'utm_term' => '<string>',
'whatsapp_message' => '<string>',
'whatsapp_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.utmkit.co/api/v1/links"
payload := strings.NewReader("{\n \"android_url\": \"<string>\",\n \"campaign_id\": 123,\n \"destination\": \"<string>\",\n \"domain\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"ios_url\": \"<string>\",\n \"note\": \"<string>\",\n \"short_code\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"utm_campaign\": \"<string>\",\n \"utm_content\": \"<string>\",\n \"utm_medium\": \"<string>\",\n \"utm_source\": \"<string>\",\n \"utm_term\": \"<string>\",\n \"whatsapp_message\": \"<string>\",\n \"whatsapp_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.utmkit.co/api/v1/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"android_url\": \"<string>\",\n \"campaign_id\": 123,\n \"destination\": \"<string>\",\n \"domain\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"ios_url\": \"<string>\",\n \"note\": \"<string>\",\n \"short_code\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"utm_campaign\": \"<string>\",\n \"utm_content\": \"<string>\",\n \"utm_medium\": \"<string>\",\n \"utm_source\": \"<string>\",\n \"utm_term\": \"<string>\",\n \"whatsapp_message\": \"<string>\",\n \"whatsapp_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.utmkit.co/api/v1/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"android_url\": \"<string>\",\n \"campaign_id\": 123,\n \"destination\": \"<string>\",\n \"domain\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"ios_url\": \"<string>\",\n \"note\": \"<string>\",\n \"short_code\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"utm_campaign\": \"<string>\",\n \"utm_content\": \"<string>\",\n \"utm_medium\": \"<string>\",\n \"utm_source\": \"<string>\",\n \"utm_term\": \"<string>\",\n \"whatsapp_message\": \"<string>\",\n \"whatsapp_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"android_url": "<string>",
"campaign_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"api_token_id": 123,
"user_id": 123
},
"destination": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"id": 123,
"ios_url": "<string>",
"note": "<string>",
"qr_url": "<string>",
"short_code": "<string>",
"short_url": "<string>",
"state": "live",
"tags": [
{
"color": "gray",
"name": "<string>"
}
],
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"warning": "<string>"
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}Create a governed short link
Requires a token with the links:write permission.
curl --request POST \
--url https://app.utmkit.co/api/v1/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"android_url": "<string>",
"campaign_id": 123,
"destination": "<string>",
"domain": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ios_url": "<string>",
"note": "<string>",
"short_code": "<string>",
"tags": [
"<string>"
],
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"whatsapp_message": "<string>",
"whatsapp_number": "<string>"
}
'import requests
url = "https://app.utmkit.co/api/v1/links"
payload = {
"android_url": "<string>",
"campaign_id": 123,
"destination": "<string>",
"domain": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ios_url": "<string>",
"note": "<string>",
"short_code": "<string>",
"tags": ["<string>"],
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"whatsapp_message": "<string>",
"whatsapp_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
android_url: '<string>',
campaign_id: 123,
destination: '<string>',
domain: '<string>',
expires_at: '2023-11-07T05:31:56Z',
ios_url: '<string>',
note: '<string>',
short_code: '<string>',
tags: ['<string>'],
utm_campaign: '<string>',
utm_content: '<string>',
utm_medium: '<string>',
utm_source: '<string>',
utm_term: '<string>',
whatsapp_message: '<string>',
whatsapp_number: '<string>'
})
};
fetch('https://app.utmkit.co/api/v1/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.utmkit.co/api/v1/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'android_url' => '<string>',
'campaign_id' => 123,
'destination' => '<string>',
'domain' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z',
'ios_url' => '<string>',
'note' => '<string>',
'short_code' => '<string>',
'tags' => [
'<string>'
],
'utm_campaign' => '<string>',
'utm_content' => '<string>',
'utm_medium' => '<string>',
'utm_source' => '<string>',
'utm_term' => '<string>',
'whatsapp_message' => '<string>',
'whatsapp_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.utmkit.co/api/v1/links"
payload := strings.NewReader("{\n \"android_url\": \"<string>\",\n \"campaign_id\": 123,\n \"destination\": \"<string>\",\n \"domain\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"ios_url\": \"<string>\",\n \"note\": \"<string>\",\n \"short_code\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"utm_campaign\": \"<string>\",\n \"utm_content\": \"<string>\",\n \"utm_medium\": \"<string>\",\n \"utm_source\": \"<string>\",\n \"utm_term\": \"<string>\",\n \"whatsapp_message\": \"<string>\",\n \"whatsapp_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.utmkit.co/api/v1/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"android_url\": \"<string>\",\n \"campaign_id\": 123,\n \"destination\": \"<string>\",\n \"domain\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"ios_url\": \"<string>\",\n \"note\": \"<string>\",\n \"short_code\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"utm_campaign\": \"<string>\",\n \"utm_content\": \"<string>\",\n \"utm_medium\": \"<string>\",\n \"utm_source\": \"<string>\",\n \"utm_term\": \"<string>\",\n \"whatsapp_message\": \"<string>\",\n \"whatsapp_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.utmkit.co/api/v1/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"android_url\": \"<string>\",\n \"campaign_id\": 123,\n \"destination\": \"<string>\",\n \"domain\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"ios_url\": \"<string>\",\n \"note\": \"<string>\",\n \"short_code\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"utm_campaign\": \"<string>\",\n \"utm_content\": \"<string>\",\n \"utm_medium\": \"<string>\",\n \"utm_source\": \"<string>\",\n \"utm_term\": \"<string>\",\n \"whatsapp_message\": \"<string>\",\n \"whatsapp_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"android_url": "<string>",
"campaign_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"api_token_id": 123,
"user_id": 123
},
"destination": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"id": 123,
"ios_url": "<string>",
"note": "<string>",
"qr_url": "<string>",
"short_code": "<string>",
"short_url": "<string>",
"state": "live",
"tags": [
{
"color": "gray",
"name": "<string>"
}
],
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"warning": "<string>"
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"details": {},
"permission": "<string>",
"retry_after_seconds": 123
}
}Authorizations
utmk_, minted on /tokens
Body
Link input
optional Android destination (spec 047): an app link or a Play page, https only; phones on Android are routed here, blank clears it
optional; a verified custom domain name, else the shared domain
optional iOS destination (spec 047): an app link or an App Store page, https only; phones on iOS are routed here, blank clears it
free text kept on the link; blank clears it
optional; random when omitted
tag names (spec 039): an existing tag of the workspace by name, case-insensitive, else a new one; on update the list replaces the link's tags and [] clears them
the prefilled message, plain text, never URL-encoded
a WhatsApp click-to-chat link (issue #202): the phone in international format (+, spaces and dashes are stripped). Given INSTEAD of destination — the wa.me URL is composed and the message encoded once, server-side
Response
Link
Show child attributes
Show child attributes
the short URL with the scan marker
live, pending, blocked, expired the link's tags, by name without regard to case
Show child attributes
Show child attributes
governance warning when the convention warns rather than blocks