The KPN Short URL API helps you to create short, unique URLs that will redirect to the specific website of your choosing.

API specification

Test the API on SwaggerHub

Base URL

Conceptual Model

Conceptual model

API workflow

API workflow


Make sure you've read Getting Started for more info on how to register your application and start trying out our APIs.


Go to the Authentication tab for more information on how to obtain an access token.

Features and constraints


Shortened URLs

All shortened URLs will have the domain "". Example:


URL length

The URL that you want to be shortened must contain less than 300 characters.

Sandbox limitation

The sandbox version of this API will overwrite the submitted url with, so every short URL generated and returned by the API, will link to the KPN API Store (

How to...

Shorten an URL

This endpoint allows you to shorten an URL.

The request body uses the following parameters:

Parameter Type Description
url string The URL you want to shorten. This field is mandatory. Example:
slug string This is the postfix of the short URL. The default is random. Example: SnfUW6
expiry_date string Date time in ISO 8601 format. The default is 14 days from the time of request. Example: 020-03-05T14:58:39.961284+01:00

^^Example request body^^
  "url": "",
  "slug": "SnfUW6",
  "expiry_date": "2020-03-05T14:58:39.961284+01:00"
^^Example response^^
  "slug": "SnfUW6",
  "url": "",
  "short_url": "",
  "expiry_date": "2020-03-05T14:58:39.961284+01:00"

Return codes

Code Description
200 Success.
201 Created.
202 Accepted.
302 Found. Link in location header.
400 Bad request.
401 Unauthorized.
403 Forbidden.
404 Not found.
405 Method not allowed.
412 Precondition failed.
429 Too many requests.
500 Internal server error.
502 Bad gateway.
503 Service unavailable.

Mopinion feedback