URL Shortening (1.0.0)

We support URL shortening for both SMS and SMS Campaign, making it easier to craft a more digestible message for your recipients and also allowing you to save characters in your messages.

Some limitations to be aware of are:

  • Only valid links are processed. A valid URL must include a proper protocol (e.g., http:// or https://) and a valid domain (e.g., example.com).
    • The following links are considered invalid links:
      • google.com (does not contain a valid protocol)
      • www.google.com (does not contain a valid protocol)
      • https://examplecom (does not contain a valid domain)
  • We can shorten links up to 250 characters in length.

SMS

For SMS messages, URL shortening automatically detects and replaces one URL in each message with a shortened link in the format smsu.io/xxxxxx. The xxxxxx placeholder represents a unique six-character alphanumeric string that is generated for each recipient during the actual sending process.

You should use this endpoint if you wish to send out a link that is specific to the recipient, such as order tracking links, or customised feedback forms.

To use short URLs on SMS sending, refer here.

SMS Campaign

We support URL shortening and subsequent link tracking within SMS campaigns.

When using the short URL functionality in SMS Campaign, all recipients will receive a shortened link in the format smsu.io/xxxxx. The xxxxx placeholder represents a unique five-character alphanumeric string that is generated for each recipient during the actual sending process.

You should use this endpoint if you're sending out the same link to many recipients and wish to track its engagement such as whether the link was opened.

To use short URLs when sending an SMS campaign, refer here.

Get Statistics

Use this endpoint to get the aggregated statistics for a shortened URL. This allows you to track the total number of clicks on the link. You can gather details such as the device type and where it was opened from as well.

Request
path Parameters
source
required
string

Source of the request.

Value: "quick_sms"
source_id
required
string

ID of the source (e.g. message ID).

header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/short-url/statistics/{source}/{source_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/short-url/statistics/{source}/{source_id}'
Response samples
application/json
{
  • "data": [
    ]
}

Get Tracking

Use this endpoint to track how individual recipients interact with the link. It returns data from the most recent click, including statistics such as how many times they’ve visited the link and when it was last opened. To use this endpoint, reference the long_url_id provided in the GET /short-url/statistics endpoint.

Request
path Parameters
long_url_id
required
string

ID of the long URL (uniquely defined by the source, source ID, and long URL). Obtained from the GET statistics endpoint.

header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/short-url/tracking/{long_url_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/short-url/tracking/{long_url_id}'
Copyright © ClickSend 2024. All right reserved.