EmberlyEmberly Docs

Short Links API

Create, list and delete short links.

Short links live at /u/<code> on your instance, for example https://embrly.ca/u/aB3dE7, or on one of your verified custom domains. All endpoints need authentication.

MethodEndpointDescription
POST/api/urlsCreate a short link
GET/api/urlsList your short links
DELETE/api/urls/{id}Delete a short link

POST /api/urls

{ "url": "https://example.com/a/very/long/path?with=query", "domain": "files.example.com" }
FieldDescription
urlThe link to shorten. It must be an http or https address. Links to private or internal addresses, such as localhost or 192.168.x.x, are refused.
domainOptional. One of your verified custom domains, to put the short link on. Send null for the main site. Leave it out to use your preferred upload domain if it's a verified custom domain, then your primary domain, then the main site. Any other domain returns 400.
curl https://embrly.ca/api/urls \
  -H "Authorization: Bearer ebk_..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/long/url"}'

Response:

{
  "success": true,
  "data": {
    "id": "clx3f8a...",
    "shortCode": "aB3dE7",
    "targetUrl": "https://example.com/long/url",
    "domain": null,
    "url": "https://embrly.ca/u/aB3dE7",
    "clicks": 0,
    "createdAt": "2026-10-24T10:00:00.000Z",
    "userId": "clx1a2b..."
  }
}

url is the full short link, on domain when one is set.


GET /api/urls

Returns all your short links, newest first, along with the verified custom domains you can use (domains) and the one used when domain is left out (defaultDomain, or null for the main site). If a link's domain has since been removed, its url uses the main site.

{
  "success": true,
  "data": {
    "urls": [
      {
        "id": "clx3f8a...",
        "shortCode": "aB3dE7",
        "targetUrl": "https://example.com/long/url",
        "domain": "files.example.com",
        "url": "https://files.example.com/u/aB3dE7",
        "clicks": 14,
        "createdAt": "2026-10-24T10:00:00.000Z",
        "userId": "clx1a2b..."
      }
    ],
    "domains": ["files.example.com"],
    "defaultDomain": "files.example.com"
  }
}

DELETE /api/urls/{id}

Returns 204 No Content. The link stops working straight away. Returns 403 if the link isn't yours.


Visiting /u/<code> on the main site or any custom domain redirects to the target and counts a click. No account is needed. A link removed by moderators returns 451.

On this page