v1

latestOpenAPI 3.1.02026-07-2414238909.1 KB

URL shortener

The endpoint allows to shorten URLs

post/shorten/urls

Headers

Content-Typestring required

application/json

Authorizationstring required

Bearer: {access_token}

Request body

namestring required

A human readable name for the shortened url. This will help identify the url in a table, or when fetching analytics data.

longUrlstring required

The url to be shortened.

domainstring required

The domain to use when shortening the url. Will be one of the domains registered by the customer, if one is not available we will return an error.

validityinteger

[Optional] For Premium and Enterprise packages the max will be set to 5.184e+6 and 7.776e+6 respectively.

callbackUrlstring

[Optional] The callback we call when a link is clicked. Payload information can be found here.

tagsobject

[Optional] A map of string field values to store information

Response

200

Example response

{
  "shortenUrls": [
    {
      "name": "Human readable name",
      "link": "string",
      "trackingId": "string",
      "longUrl": "string",
      "expirationDate": "string",
      "createdAt": "string",
      "callbackUrl": "callback url",
      "tags": {
        "tag1": "value1",
        "tag2": "value2"
      }
    }
  ]
}