APIs Endpoints

Create a link

POST https://urly.it/api/v1/links

Shorten a new link.

Parameters

Parameters to send via JSON payload:

  • destination is the long URL that you want to shorten (mandatory).
  • destination_android, destination_ios, destination_smartphone, destination_tablet: alternative URLs for other destinations, when opening the short link on an Android, iOS, generic smartphone or generic tablet device respectively. Those fields can be null (optional).
  • password: a password required to "unlock" the link (optional).
  • skip_interstitial: boolean value. If true, the link is direct without a preview page (optional, if not specified the default value is true for Urly Plus accounts).

Minimal example:

{
  "destination": "https://www.example.com"
}

Response

An object data is returned, with all the link data.

Minimal example:

{
  "data": {
    "slug": "362",
    "url": "http:\/\/urly.it\/33",
    "url_without_protocol": "urly.it\/33",
    // ...
  }
}

The full response object is shown in the next endpoint response ("Show details for a link").

Show details for a link

GET https://urly.it/api/v1/links/{slug}

Show details for one of your own links.

Parameters

URL parameters:

  • {slug} is the link identifier for the requested link.

Response

data is an object with all the link data:

  • created_at: date and time of creation in ISO format.
  • destination: the URL destination link.
  • destination_android, destination_ios, destination_smartphone, destination_tablet: alternative URLs for other destinations, when opening the short link on an Android, iOS, generic smartphone or generic tablet device respectively. Those fields can be null if they are not specified.
  • password: a password required to "unlock" the link, if present. Otherwise it’s null.
  • qr_url: URL to a page which shows the QR Code of the link.
  • qr_image_png: direct URL to the PNG image of the QR Code.
  • qr_image_svg: direct URL to the SVG image of the QR Code.
  • skip_interstitial: boolean value. If true, the link is direct, without a preview page.
  • slug: the link identifier.
  • url: the shortened URL, including the https:// protocol.
  • url_without_protocol: the shortened URL, without the https:// protocol.
  • visits: an integer of the number of link openings.
{
  "data": {
    "created_at": "2021-12-08T17:16:57.000000Z",
    "destination": "http:\/\/urly.it",
    "destination_android": "http:\/\/urly.it#example_link",
    "destination_ios": null,
    "destination_smartphone": null,
    "destination_tablet": null,
    "password": "secret",
    "qr_url": "http:\/\/urly.it\/qr\/33",
    "qr_image_png": "http:\/\/urly.it\/qr\/image\/33.png",
    "qr_image_svg": "http:\/\/urly.it\/qr\/image\/33.svg",
    "skip_interstitial": true,
    "slug": "33",
    "url": "http:\/\/urly.it\/33",
    "url_without_protocol": "urly.it\/33",
    "visits": 0
  }
}

Show all links

GET https://urly.it/api/v1/links

Show a list of links made with your account.

Parameters

No parameters.

Response

  • data is an array of your own links.
  • links is an object with all the URLs required to navigate through the pages of results (first is the first page, last is the last one, prev is the previous one, next is the next one).
  • meta is an object with information about the pagination (es. current_page is the current page number, last_page is the number of the last page).
{
  "data": [
    {
      "created_at": "2022-01-01T08:00:00.000000Z",
      "destination": "http:\/\/urly.it",
      "destination_android": null,
      "destination_ios": null,
      "destination_smartphone": null,
      "destination_tablet": null,
      "password": null,
      "qr_url": "http:\/\/urly.it\/qr\/33",
      "qr_image_png": "http:\/\/urly.it\/qr\/image\/33.png",
      "qr_image_svg": "http:\/\/urly.it\/qr\/image\/33.svg",
      "skip_interstitial": true,
      "slug": "33",
      "url": "http:\/\/urly.it\/33",
      "url_without_protocol": "urly.it\/33",
      "visits": 0
    },
    // ...more links
  ],
  "links": {
    "first": "http:\/\/urly.it\/api\/v1\/links?page=1",
    "last": "http:\/\/urly.it\/api\/v1\/links?page=2",
    "prev": null,
    "next": "http:\/\/urly.it\/api\/v1\/links?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 2,
    "links": [
      {
        "url": null,
        "label": "Indietro",
        "active": false
      },
      {
        "url": "http:\/\/urly.it\/api\/v1\/links?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": "http:\/\/urly.it\/api\/v1\/links?page=2",
        "label": "2",
        "active": false
      },
      {
        "url": "http:\/\/urly.it\/api\/v1\/links?page=2",
        "label": "Avanti",
        "active": false
      }
    ],
    "path": "http:\/\/urly.it\/api\/v1\/links",
    "per_page": 10,
    "to": 10,
    "total": 19
  }
}

Show user

GET https://urly.it/api/v1/user

Show your own user data.

Parameters

No parameters.

Response

data is an object with user data.

{
  "data": {
    "email": "[email protected]",
    "name": "John Doe"
  }
}
Any other questions? Do you need help? We’re here to help.