Create Smart Link Asset API (Beta)

📘

This API is currently available only for clients hosted in the AWS-USA data centre.

This API is used to create a link asset in a tenant. The token must be generated by passing the clientId and clientSecret keys of the tenant using the Get Token API. The validity of the token is 300 seconds. This API returns an asset id with which a smart link can be created with the Create Smart Links API.

📘

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 HeaderDescription
content-Typeapplication/json
AuthorizationAccess token in Bearer format

Example: Bearer $(key)

Body Parameters

The following table describes the elements in the request body:

ParameterTypeMandatoryDescription
longUrlStringYesSpecifies a long URL that has to be added as an asset.
domainsStringYesSpecifies the domain name in which the link asset will be created.
deviceRoutingStringYesSpecifies the OS specific URLs.
androidUrl: Specifies the Android specific URL.
"iosUrl: Specifies the iOS specific URL.
* "windowsUrl Specifies the Windows specific URL.
redirectParamStringNoSpecifies the redirect parameter. The default value is redirect.
encAlgoStringYesSpecifies the encryption algorithm.
encPassKeyStringYesSpecifies the encryption passkey.
expiresOnStringYesSpecifies the date till which the link is valid.
expiryUrlStringYesSpecifies the redirect URL on link expiry.
urlContextStringYesSpecifies the context parameters that are used for personalization.
referenceIdStringYesSpecifies a referenceid for the link.

Request Example


{
  "longUrl": "https://touchstone1.webexcampaign.io/nextgen",
  "domain": "ciscowebexcampaign6.com",
  "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": "c28334308cd04a239eecb85803dd2d2b"
}

Response Parameters

This API will return the following response parameters:

ParameterDescription
codeReturns the success response code
messageReturns the confirmation message.
idReturns the id of the link asset.

Failure Response Codes

The API will return a code within the response as per the following table in case of failure scenarios.

HTTP Status CodeCode within API ResponseDescription
400NABad request
401NAAuthorization failed. This resource is not allowed to access using this TOKEN or KEY
401NAInvalid token or Access token expired
405NAMethod not supported
409NAConflict
500NAInternal server error.
Language