Short links
Short links on your domain and their clicks.
Values for the examples
Type them once and every example on this page uses them. The API key stays on this page only and is never saved.
GET/v1/short-links
Lists the short links.
ListOn success: 200.Permission: Read.
Example
curl -X GET "https://api.firmado.app/v1/short-links" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/short-links", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/short-links",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/short-links", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/short-links");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
[]POST/v1/short-links
Creates a short link on the organization’s domain.
CreateOn success: 201.Permission: Create.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | min length 1 · max length 100 |
url | string | Yes | max length 2000 |
code | string | No | pattern ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$ |
Response
12 fields
| Field | Type | Always there |
|---|---|---|
active | boolean | Yes |
clicks | integer | Yes |
clicks30 | integer | Yes |
code | string | Yes |
createdAt | string (date-time) | Yes |
createdBy | string (uuid) | Yes |
id | string (uuid) | Yes |
name | string | Yes |
shortUrl | string (uri) | Yes |
updatedAt | string (date-time) | Yes |
updatedBy | string (uuid) | Yes |
url | string (uri) | Yes |
Example
curl -X POST "https://api.firmado.app/v1/short-links" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}'const res = await fetch("https://api.firmado.app/v1/short-links", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/short-links",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/short-links", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/short-links");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (201), with sample values:
{
"active": true,
"clicks": 1,
"clicks30": 1,
"code": "…",
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"shortUrl": "https://example.com",
"updatedAt": "2026-11-21T14:00:00.000Z",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"url": "https://example.com"
}DELETE/v1/short-links/{id}
Deletes a short link.
DeleteOn success: 204.Permission: Delete.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Example
curl -X DELETE "https://api.firmado.app/v1/short-links/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/short-links/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/short-links/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/short-links/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/short-links/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/short-links/{id}
Returns a short link.
Get oneOn success: 200.Permission: Read.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Response
12 fields
| Field | Type | Always there |
|---|---|---|
active | boolean | Yes |
clicks | integer | Yes |
clicks30 | integer | Yes |
code | string | Yes |
createdAt | string (date-time) | Yes |
createdBy | string (uuid) | Yes |
id | string (uuid) | Yes |
name | string | Yes |
shortUrl | string | null (uri) | Yes |
updatedAt | string (date-time) | Yes |
updatedBy | string (uuid) | Yes |
url | string (uri) | Yes |
Example
curl -X GET "https://api.firmado.app/v1/short-links/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/short-links/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/short-links/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/short-links/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/short-links/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"code": "…",
"name": "Ana Lima",
"url": "https://example.com",
"active": true,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"shortUrl": "https://example.com",
"clicks": 1,
"clicks30": 1
}PATCH/v1/short-links/{id}
Changes where a short link goes.
UpdateOn success: 200.Permission: Update.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | No | min length 1 · max length 100 |
url | string | No | max length 2000 |
code | string | No | pattern ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$ |
active | boolean | No |
Response
12 fields
| Field | Type | Always there |
|---|---|---|
active | boolean | Yes |
clicks | integer | Yes |
clicks30 | integer | Yes |
code | string | Yes |
createdAt | string (date-time) | Yes |
createdBy | string (uuid) | Yes |
id | string (uuid) | Yes |
name | string | Yes |
shortUrl | string (uri) | Yes |
updatedAt | string (date-time) | Yes |
updatedBy | string (uuid) | Yes |
url | string (uri) | Yes |
Example
curl -X PATCH "https://api.firmado.app/v1/short-links/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}'const res = await fetch("https://api.firmado.app/v1/short-links/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/short-links/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": True,
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/short-links/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/short-links/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"url": "https://example.com",
"code": "…",
"active": true
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"code": "…",
"name": "Ana Lima",
"url": "https://example.com",
"active": true,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"shortUrl": "https://example.com",
"clicks": 1,
"clicks30": 1
}GET/v1/short-links/{id}/stats
Clicks of a short link, per day.
Read/{id}/statsOn success: 200.Permission: Read.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Query parameters
| Field | Type | Required | Notes |
|---|---|---|---|
days | integer | No | default 30 |
Response
14 fields
| Field | Type | Always there |
|---|---|---|
clicks | integer | Yes |
countries | array of object | Yes |
countries[].clicks | integer | Yes |
countries[].key | string | Yes |
days | integer | Yes |
devices | array of object | Yes |
devices[].clicks | integer | Yes |
devices[].key | string | Yes |
series | array of object | Yes |
series[].clicks | integer | Yes |
series[].day | string (date) | Yes |
sources | array of object | Yes |
sources[].clicks | integer | Yes |
sources[].key | string | Yes |
Example
curl -X GET "https://api.firmado.app/v1/short-links/{id}/stats" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/short-links/{id}/stats", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/short-links/{id}/stats",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links/{id}/stats");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links/{id}/stats")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/short-links/{id}/stats", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links/{id}/stats"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/short-links/{id}/stats");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"days": 1,
"clicks": 1,
"series": [
{
"day": "2026-11-21",
"clicks": 1
}
],
"sources": [
{
"key": "…",
"clicks": 1
}
],
"countries": [
{
"key": "…",
"clicks": 1
}
],
"devices": [
{
"key": "…",
"clicks": 1
}
]
}GET/v1/short-links/domain
The domain short links use, and whether it works.
Read/domainOn success: 200.Permission: Read.
Response
1 field
| Field | Type | Always there |
|---|---|---|
hostname | string | null | Yes |
Example
curl -X GET "https://api.firmado.app/v1/short-links/domain" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/short-links/domain", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/short-links/domain",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/short-links/domain");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/short-links/domain")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/short-links/domain", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/short-links/domain"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/short-links/domain");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"hostname": "Ana Lima"
}Webhook events
Changes of this feature that webhooks can send.
short_link.createdCreateshort_link.updatedUpdateshort_link.deletedDelete