Link shortener

Create a short link

Changed on

Creates a short link that redirects to the target URL and tracks click metrics.

post/v1/short-links

Request

  • Base URL
    https://api.wavix.com
  • URL
    https://api.wavix.com/v1/short-links
  • Auth
    HTTP bearer

Request body

linkstring uri required

Target URL to shorten. Must be https:// — the short link is publicly resolvable and redirects any visitor here, so only pass URLs you trust; this endpoint is a common target for open-redirect and phishing abuse.

expiration_timestring date-time

Expiration date and time in ISO 8601 format.

fallback_urlstring uri

Fallback URL for expired or invalid links. Must be https:// — same open-redirect/phishing considerations as link apply.

phonestring

Phone number the short link is associated with, in E.164 format (without the leading +). Used to attribute click metrics returned by short link metrics list.

utm_campaignstring

UTM campaign name for tracking insights.

Example request

{
  "link": "https://your-site.com/long-url",
  "expiration_time": "2023-07-19T18:18:34.235Z",
  "fallback_url": "https://examples.com/fallback",
  "phone": "15155982927",
  "utm_campaign": "summer_promo"
}

Response

Returns the created short link.

short_linkstring required

Generated short URL.

Example response

{
  "short_link": "https://wx.com/hd82Jhs21"
}

Changes

    • breaking

      the request's body type changed from no type to object

    • breaking

      added the pattern ^https:// to the request property /

    • breaking

      added the pattern ^https:// to the request property /

    • breaking

      the / request property format changed from no format to uri

    • breaking

      the / request property format changed from no format to uri

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed from the response body allOf list for the response status

    • info

      removed from the response body allOf list for the response status

    • info

      added the non-success response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status