<aside> 🔗 Url to use the service: https://masivlinks.masivapp.com/shorter

</aside>

This endpoint serves both to create a single URL and to create multiple URLs, in case you want to create multiple URLs it is only necessary to add each URL to add within the UrlRequest parameter.

You can create a maximum of 1500 URLs within the same request. If the use of the product is to create multiple URLs belonging to the same campaign (delivery) we recommend performing all generations in batches, in this way the consumption of the product is optimal.

Request Body

Parameter Description Required
IdClient Data type: Integer.
Id of the client who performs the generation.
IdCampaign Data type: Integer.
Id de la campaña a la que pertenece la generación
IdProduct Data type: String.
Id of the product from which the consumption is made.
Default value: ‘links’.
IdProduct Mapping:
IdDelivery Data Type: String.
Id of the delivery to which the generation belongs.
Maximum length: 50 characters.
⚠️ If the product from which the generation is made is Links, this id will change internally.
UrlRequest Data Type: Array de Url .
Min: 1
Max: 1500
CustomDomain Data type: String.
If you want the generated url(s) to have a different domain than the default, enter the domain. This domain must be configured beforehand within the Links product, otherwise the generated url(s) will fail if the process has not been done: ‣

If this domain is not specified, the generation will be done with Links’ default domain. This domain is universal for all customers.

⚠️The domain must exist and be configured for the client

Default value: https://ma.sv Maximum length: 50 characters. | ❌ | | Metadata | Data Type: JSON Object General information that will be sent by Links to the webhooks configured within the click event information. | ❌ | | WebHooks | Data Type: String Array Links will notify each of the webhooks of every click event of the generated urls, within the notification, click event information and the defined metadata will be sent. Maximum length by Hook Address: 1000 characters. ‣ | ❌ | | ActiveDate | Data type: String. Activation date of the url(s). ⚠️ Must be in UTC 0 Default value: current date of the request. Format: ‘YYYY-MM-DD HH:mm:ss’ | ❌ | | DueDate | Data type: String. Expiration date of the url(s). ⚠️ Must be in UTC 0 Default value: 3 months. Format: ‘YYYY-MM-DD HH:mm:ss’ | ❌ | | UrlType | Data type: Integer. Allowed url(s) types: 0, 1, and 2 Default value: 0 UrlType Mapping: | ❌ |

Url

Parameter Description Required
Url Data type: String.
Url to shorten
Maximum length: 1000 characters
Name Data Type: String.
Name of the Url
Maximum length: 150 characters.
Preview Url Preview
Recipient Data type: String.
Recipient of the url. This data allows to individualize the created URL for later use.
Metadata Data type: Json Object.
Information that you want to be specific to the generated url and that will be sent by Links to the configured webhooks within the click event information.

Url Preview

Parameter Description Required
Title Data Type: String.
Preview title
Maximum length: 255 characters.
Description Data Type: String.
Previews description
Maximum length: 255 characters.
UrlImage Data Type: String.
Url from which the image that appears in the preview of the generated url will be referenced. This url should be easily accessible to avoid errors in both the redirection and the preview display.
KeyImage Data Type: String.
Key to access the preview image from Links’ internal files. Use if a url has been generated from the Links Front.

<aside> 💡 What is a URL preview? Below is a detailed description of URL previews within designated communications and/or channels.

Link Preview

</aside>

IdProduct Mapping:

Product / Cell Product Id
SMS sms
Automation automation
Email email
Sherlock sherlock
File Builder filebuilder
WhatsApp whatsapp
Integrations vertical
File Reader filereader
Transactional Hub hub
Shield shield
Links links
Ocean ocean
TruSense trusense
SmsApi smsapi
SmsCampaign smscampaign

UrlType Mapping:

Type Url Type Description
0 Unique One destination url, one shortened url, one recipient
1 Specific One destination url, multiple shortened urls, multiple recipients
2 Custom (Personalized) Multiple destination URLs, multiple shortened URLs, multiple recipients. For products other than Links, this will be the default type.
3 QR One destination URL, one shortened URL, one recipient. A QR code is generated as a response.
curl --location '<https://masivlinks.masivapp.com/shorter>'
--header 'Authorization: <YourAuthToken>'
--header 'Content-Type: application/json' \\
--data '{
    "idClient": 1,
    "idCampaign": 111,
    "idProduct": "links",
    "idDelivery": "Prueba",
    "UrlRequest":[
        {
            "name": "url name", 
            "url": "<https://www.google.com/>",
            "Preview":{
                "Title":"Preview Title",
                "Description":"Preview Description",
                "UrlImage":"<https://image-url.com>"
								"KeyImage": "image-location"
            }
        }
    ],
    "UrlType":0,
		"customDomain": "<https://custom.domain>",
		"ActiveDate": "2023-09-12 23:59:59",
    "DueDate": "2024-09-12 23:59:59",
		"metadata": {
				"info": "example info",
				"metadataAdditionalInfo"{
						"information": "example info inside metadata"
				}
		}
    "webhooks": [
        "<https://webhook-to-notify.com>"
    ]
}'

Responses

General Response

Field Description
Code Integer with the Status Code of the request
Message String with a message that specifies the result of the request.
Errors List with the errors that occurred in the request. Error Response
Data Array of generated urls. Success Response

Error Response

Field Description
Name Name of the error
Description Description of the error