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.

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_..."

Response (200), with sample values:

[]

POST/v1/short-links

Creates a short link on the organization’s domain.

CreateOn success: 201.Permission: Create.

Body

FieldTypeRequiredNotes
namestringYesmin length 1 · max length 100
urlstringYesmax length 2000
codestringNopattern ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$

Response

12 fields
FieldTypeAlways there
activebooleanYes
clicksintegerYes
clicks30integerYes
codestringYes
createdAtstring (date-time)Yes
createdBystring (uuid)Yes
idstring (uuid)Yes
namestringYes
shortUrlstring (uri)Yes
updatedAtstring (date-time)Yes
updatedBystring (uuid)Yes
urlstring (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": "…"
}'

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"
}

Deletes a short link.

DeleteOn success: 204.Permission: Delete.

Path parameters

FieldTypeRequiredNotes
idstringYes
Example
curl -X DELETE "https://api.firmado.app/v1/short-links/{id}" \
  -H "X-Api-Key: fmd_..."

Returns a short link.

Get oneOn success: 200.Permission: Read.

Path parameters

FieldTypeRequiredNotes
idstringYes

Response

12 fields
FieldTypeAlways there
activebooleanYes
clicksintegerYes
clicks30integerYes
codestringYes
createdAtstring (date-time)Yes
createdBystring (uuid)Yes
idstring (uuid)Yes
namestringYes
shortUrlstring | null (uri)Yes
updatedAtstring (date-time)Yes
updatedBystring (uuid)Yes
urlstring (uri)Yes
Example
curl -X GET "https://api.firmado.app/v1/short-links/{id}" \
  -H "X-Api-Key: fmd_..."

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
}

Changes where a short link goes.

UpdateOn success: 200.Permission: Update.

Path parameters

FieldTypeRequiredNotes
idstringYes

Body

FieldTypeRequiredNotes
namestringNomin length 1 · max length 100
urlstringNomax length 2000
codestringNopattern ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$
activebooleanNo

Response

12 fields
FieldTypeAlways there
activebooleanYes
clicksintegerYes
clicks30integerYes
codestringYes
createdAtstring (date-time)Yes
createdBystring (uuid)Yes
idstring (uuid)Yes
namestringYes
shortUrlstring (uri)Yes
updatedAtstring (date-time)Yes
updatedBystring (uuid)Yes
urlstring (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
}'

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
}

Clicks of a short link, per day.

Read/{id}/statsOn success: 200.Permission: Read.

Path parameters

FieldTypeRequiredNotes
idstringYes

Query parameters

FieldTypeRequiredNotes
daysintegerNodefault 30

Response

14 fields
FieldTypeAlways there
clicksintegerYes
countriesarray of objectYes
countries[].clicksintegerYes
countries[].keystringYes
daysintegerYes
devicesarray of objectYes
devices[].clicksintegerYes
devices[].keystringYes
seriesarray of objectYes
series[].clicksintegerYes
series[].daystring (date)Yes
sourcesarray of objectYes
sources[].clicksintegerYes
sources[].keystringYes
Example
curl -X GET "https://api.firmado.app/v1/short-links/{id}/stats" \
  -H "X-Api-Key: fmd_..."

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
    }
  ]
}

The domain short links use, and whether it works.

Read/domainOn success: 200.Permission: Read.

Response

1 field
FieldTypeAlways there
hostnamestring | nullYes
Example
curl -X GET "https://api.firmado.app/v1/short-links/domain" \
  -H "X-Api-Key: fmd_..."

Response (200), with sample values:

{
  "hostname": "Ana Lima"
}

Webhook events

Changes of this feature that webhooks can send.

  • short_link.createdCreate
  • short_link.updatedUpdate
  • short_link.deletedDelete