post https://smartlink-dev.qa.imicampaign.io/sls/links
This API is currently available only for clients hosted in the AWS-USA data centre.
This API is used to create a smart link in a tenant. The token must be generated by passing the clientId and clientSecret keys of the tenant using Get Token API. The validity of the token is 300 seconds.
Based on the domain that is assigned, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.
Headers
The following table describes the request headers:
Request Header | Description |
---|---|
content-Type | application/json |
Authorization | Access token in Bearer format Example: Bearer $(key) |
Body Parameters
The following table describes the elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
longUrl | String | Yes | Specifies a long URL. |
domains | String | Yes | Specifies the domain name in which the smart link will be created. |
linkassetid | String | Yes | Specifies the link asset Id. |
deviceRouting | String | Yes | Specifies the OS specific URLs. androidUrl: Specifies the Android specific URL. "iosUrl: Specifies the iOS specific URL. * "windowsUrl Specifies the Windows specific URL. |
redirectParam | String | No | Specifies the redirect parameter. The default value is redirect. |
encAlgo | String | Yes | Specifies the encryption algorithm. |
encPassKey | String | Yes | Specifies the encryption passkey. |
expiresOn | String | Yes | Specifies the date till which the link is valid. |
expiryUrl | String | Yes | Specifies the redirect URL on link expiry. |
urlContext | String | Yes | Specifies the context parameters that are used for personalization. |
referenceId | String | Yes | Specifies a referenceid for the smart link. |
Request Example
\\To create a smart link
{
"longUrl": "https://touchstone1.webexcampaign.io/nextgen",
"domain": "ciscowebexcampaign6.com",
"linkAssertId":"0d34109e443c41a0b4c509dd76b21099",
"deviceRouting": {
"androidUrl": "https://touchstone1-android.webexcampaign.io/nextgen",
"iosUrl": "https://touchstone1-ios.webexcampaign.io/nextgen",
"windowsUrl": "https://touchstone1-windows.webexcampaign.io/nextgen"
},
"redirectParam": "redirect",
"encAlgo": "AES",
"encPassKey": "testingtest@1234",
"expiresOn": "2023-10-08T07:44:51.000Z",
"expiryUrl": "https://touchstone1.webexcampaign.io/expired",
"urlContext": {
"msisdn": "123456789"
},
"referenceId": "6391b6da5481373783e33952"
}
Response Example
{
"code": "1001",
"message": "SmartLinks Details Added Successfully.",
"id": "BAii9i7p",
"smartLink": "https://ciscowebexcampaign6.com/BAii9i7p"
}
Response Parameters
This API will return the following response parameters:
Parameter | Description |
---|---|
code | Returns the success response code |
message | Returns the confirmation message. |
id | Returns the ID of the smart link. |
smartLink | Returns the URL with smart link. |
Failure Response Codes
The API will return a code within the response as per the following table in case of failure scenarios.
HTTP Status Code | Code within API Response | Description |
---|---|---|
400 | NA | Bad request |
401 | NA | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | NA | Invalid token or Access token expired |
405 | NA | Method not supported |
409 | NA | Conflict |
500 | NA | Internal server error. |