URL Shortener
Create short URLs on the msgi.me domain, or a custom-branded domain, that redirect contacts to a destination URL. For teams and developers shortening links used in broadcasts.
Create short URLs that redirect end users to a destination URL. By default, short URLs use the msgi.me domain.
Optional: Use a custom domain
Request a custom-branded domain from your Operations team. They will provide available domain options for you to review and select.
If you use a domain that you already own, consider these limitations:
- No subdomain assignment: You cannot assign unique subdomains to individual customers. All users access the platform through the same shared URL.
- No per-space branding: You cannot apply different logos or icons for each customer workspace. All customers see the same branding.
Example:
- Provided domain:
mydomain.com - Shared access URL:
cpass.mydomain.com(applies to all customers)
NOTEOnly one custom domain can be assigned per owner.
If you want to use your own branded domain (Custom Domain), please reach out our Account Manager or Support Team for further assistance.
A URL shortener converts a long destination URL into a shorter link that recipients can click or enter more easily.
URL Shortener ExpirationBy default, every short URL remains active for 1 year from its creation date. After this period, the short URL expires and no longer redirects users to the destination URL.
Create a short URL
Use this POST method to create a short URL under a specified domain. If you do not include a domain, the short URL uses the default msgi.me domain.
Include the following data in the request body:
HTTP Request: POST / links
{
"longUrl": "www.your_URL.com"
}The parameters presented in the request body example when creating the short URL are the following:
| Parameter | Required | Description |
|---|---|---|
| longUrl | Yes | URL destination name. Enter the URL link to which the short URL will redirect. |
| domain | No | Domain which short URL will belong to (string without http/https or /). Enter the custom domain in case you have requested it from the support team. By default is |
| data | No | This array can be used by the customer to enter and store additional information about the short URL. This additional information must be set in JSON format at key/value level. For example:
|
| callbacks | No | Webhook URL to notify about the events of the short URL. The URL is the external callback where the events of the short URL will be registered and published. The following short URL status sent to your callback URL will be the status to be recorded in the callback once end user has clicked on the short URL:
|
| externalId | No | Alphanumeric identifier used for reporting purposes. |
A successful request returns the following response body:
{
"meta": {
"timestamp": 1688140030182,
"transactionId": "aff87e14-d362-41c7-9db8-cb4dfc9b"
},
"data": {
"id": "T75bmJ",
"longUrl": "www.your_URL.com",
"data": {},
"shortLink": "msgi.me/T75bmJ",
"date": "2023-06-30T15:47:10.281138536Z"
}
}The response body includes the following parameters:
| Parameter | Description |
|---|---|
| data | Data contained in the Short URL. |
| data. id |
Unique identifier of the short URL. |
| data. longUrl |
URL destination name. URL link to which the short URL will redirect. |
| data. domain |
Optional. Domain which short URL will belong to (string without By default is |
| data. data |
Optional. This array can be used by the customer to enter and store additional information about the short URL. This additional information must be set in JSON format at key/value level. For example: "data": { "name": "Elizabeth Smith", "email": "[email protected]" } |
| data. callbacks |
Optional. Webhook URL to notify about the events of the short URL. The URL is the external callback where the events of the short URL will be registered and published. The following short URL status sent to your callback URL will be the status to be recorded in the callback once end user has clicked on the short URL:
|
| data. externalId |
Optional. Alphanumeric identifier used for reporting purposes. |
| data. shortLink |
Short URL link. Copy and paste this short URL into your browser to test it. |
| data. date |
Date when the short URL was created. The date is represented with date in UTC Zulu format: (yyyy-mm-dd-Thh:mm:ss.ssZ). |
Create batch short URLs
Use this endpoint to create multiple short URLs in one POST request. You can create multiple links for one destination URL or create links for multiple destination URLs.
Single destination URL
Use this request to create multiple unique short URLs that all redirect to the same destination URL.
Include the following data in the request body:
HTTP Request: POST /links/batch
Specify the total number of short URLs to create before sending the request.
| Required Parameter | Description |
|---|---|
| size | Total number of short URLs to generate. |
{
"listUrl": [
{
"longUrl": "www.your_URL.com"
}
]
}The parameters presented in the request body example when creating the short URLs are the following:
| Parameter | Required | Description |
|---|---|---|
| listUrl | Yes | URL destination name. Enter the URL link to which the short URL will redirect. |
| listUrl. longUrl |
Yes | URL destination name. Enter the URL link to which the short URL will redirect. |
| listUrl. domain |
No | Domain which short URL will belong to (string without http/https or /). Enter the custom domain in case you have requested it from the support team. By default is |
| listUrl. data |
No | This array can be used by the customer to enter and store additional information about the short URL. This additional information must be set in JSON format at key/value level. For example:
|
| listUrl. callbacks |
No | Webhook URL to notify about the events of the short URL. The URL is the external callback where the events of the short URL will be registered and published. The following short URL status sent to your callback URL will be the status to be recorded in the callback once end user has clicked on the short URL:
|
| listUrl. externalId |
No | Alphanumeric identifier used for reporting purposes. |
If you set 3 as the total number of short URLs to create, the response body contains the following data:
{
"meta": {
"timestamp": 1688403131016,
"transactionId": "b58521b4-e711-483d-aa39-3de01f355eca"
},
"items": [
{
"id": "P2siWu",
"longUrl": "www.your_URL.com",
"data": {},
"shortLink": "msgi.me/P2siWu",
"date": "2023-07-03T16:52:11.096051603Z"
},
{
"id": "08KDbx",
"longUrl": "www.your_URL.com",
"data": {},
"shortLink": "msgi.me/08KDbx",
"date": "2023-07-03T16:52:11.134291422Z"
},
{
"id": "40rN6n",
"longUrl": "www.your_URL.com",
"data": {},
"shortLink": "msgi.me/40rN6n",
"date": "2023-07-03T16:52:11.168937835Z"
}
]
}The response body includes the following parameters:
| Parameter | Description |
|---|---|
| items | List (array) of short URLs created. |
| items. id |
Unique identifier of the short URL. |
| items. longUrl |
URL destination name. URL link to which the short URL will redirect. |
| items. domain |
Optional. Domain which short URL will belong to (string without By default is |
| items. data |
Optional. This array can be used by the customer to enter and store additional information about the short URL. This additional information must be set in JSON format at key/value level. For example: "data": { "name": "Elizabeth Smith", "email": "[email protected]" } |
| items. callbacks |
Optional. Webhook URL to notify about the events of the short URL. The URL is the external callback where the events of the short URL will be registered and published. The following short URL status sent to your callback URL will be the status to be recorded in the callback once end user has clicked on the short URL:
|
| items. externalId |
Optional. Alphanumeric identifier used for reporting purposes. |
| items. shortLink |
Short URL link. Copy and paste this short URL into your browser to test it. |
| items. date |
Date when the short URL was created. The date is represented with date in UTC Zulu format: (yyyy-mm-dd-Thh:mm:ss.ssZ). |
Multiple destination URLs
Use this request to create short URLs for multiple different destination URLs. Each short URL redirects to its corresponding destination URL.
Include the following data in the request body:
HTTP Request: POST /links/batch
{
"listUrl": [
{
"longUrl": "www.your_URL.com"
},
{
"longUrl": "www.your_URL_2.com"
}
]
}The parameters presented in the request body example when creating the short URLs are the following:
| Parameter | Required | Description |
|---|---|---|
| listUrl | Yes | URL destination name. Enter the URL link to which the short URL will redirect. |
| listUrl. longUrl |
Yes | URL destination name. Enter the URL link to which the short URL will redirect. |
| listUrl. domain |
No | Domain which short URL will belong to (string without http/https or /). Enter the custom domain in case you have requested it from the support team. By default is |
| listUrl. data |
No | This array can be used by the customer to enter and store additional information about the short URL. This additional information must be set in JSON format at key/value level. For example:
|
| listUrl. callbacks |
No | Webhook URL to notify about the events of the short URL. The URL is the external callback where the events of the short URL will be registered and published. The following short URL status sent to your callback URL will be the status to be recorded in the callback once end user has clicked on the short URL:
|
| listUrl. externalId |
No | Alphanumeric identifier used for reporting purposes. |
A successful request returns the following response body:
{
"meta": {
"timestamp": 1688152455360,
"transactionId": "41a59219-b213-49e7-9b5c-336c02a5a929"
},
"items": [
{
"id": "8kukt7",
"longUrl": "www.your_URL.com",
"data": {},
"shortLink": "msgi.me/8kukt7",
"date": "2023-06-30T19:14:15.445127033Z"
},
{
"id": "CM9X2S",
"longUrl": "www.your_URL_2.com",
"data": {},
"shortLink": "msgi.me/CM9X2S",
"date": "2023-06-30T19:14:15.483220634Z"
}
]
}The response body includes the following parameters:
| Parameter | Description |
|---|---|
| items | List (array) of short URLs created. |
| items. id |
Unique identifier of the short URL. |
| items. longUrl |
URL destination name. URL link to which the short URL will redirect. |
| items. domain |
Optional. Domain which short URL will belong to (string without By default is |
| items. data |
Optional. This array can be used by the customer to enter and store additional information about the short URL. This additional information must be set in JSON format at key/value level. For example: "data": { "name": "Elizabeth Smith", "email": "[email protected]" } |
| items. callbacks |
Optional. Webhook URL to notify about the events of the short URL. The URL is the external callback where the events of the short URL will be registered and published. The following short URL status sent to your callback URL will be the status to be recorded in the callback once end user has clicked on the short URL:
|
| items. externalId |
Optional. Alphanumeric identifier used for reporting purposes. |
| items. shortLink |
Short URL link. Copy and paste this short URL into your browser to test it. |
| items. date |
Date when the short URL was created. The date is represented with date in UTC Zulu format: (yyyy-mm-dd-Thh:mm:ss.ssZ). |
Updated about 1 hour ago
