# Create or Update a URL Shortener

Creates or updates tracking link. For updates, the id must be set to an existing URL shortener id. For create, the URL shortener id should be set to 0.

Path Parameters
<section class="api_parameters"><section class="api_param"><div class="api_param_header"><span class="p_name">id</span><span class="p_type">string</span><span class="p_isrequired">required</span></div></section></section>
HTTP Request Examples

{
  "previewUrl": "",
  "name": "Test Link",
  "tenantId": 894,
  "url": "http://example.com/",
  "alternativeUrl": "",
  "password": "",
  "maxClicks": 0,
  "expirationDate": "9999-12-31T00:00:00",
  "forwardParams": true,
  "campaignId": 1976,
  "total\_converted": 0,
  "linkDirection": "Outbound",
  "linkType": "Page",
  "redirectType": "Temporary",
  "status": "Active",
  "IsEnabled": true,
  "TrackingFullUrl": "https://dslnk.co/5z3dzrwk"
}

HTTP Response Examples

200

{
  "Status": true,
  "Message": "",
  "Response": {
    "id": "0"
  }
}