L2S - API Docs
Visit L2S
Visit L2S
Get API Key
  1. URL
  • URL
    • Shorten a URL
      POST
    • Get URL details
      GET
    • Update URL details
      PUT
  • User
    • Get user settings
      GET
  1. URL

Update URL details

PUT
/url/{id}
URL
This endpoint updates details of a shortened URL by its ID.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
string 
required
The ID of the shortened URL
Body Params application/json
url
string 
optional
The new URL to be shortened
tags
array[string]
optional
Updated tags associated with the URL
utmSource
string 
optional
Updated UTM source parameter
utmMedium
string 
optional
Updated UTM medium parameter
utmCampaign
string 
optional
Updated UTM campaign parameter
utmTerm
string 
optional
Updated UTM term parameter
utmContent
string 
optional
Updated UTM content parameter
Example
{
  "url": "http://showy-paddock.net",
  "tags": [
    "dolores"
  ],
  "utmSource": "sint culpa Duis voluptate Excepteur",
  "utmMedium": "irure nostrud esse",
  "utmCampaign": "pariatur",
  "utmTerm": "esse",
  "utmContent": "Libero nam minus ducimus. Fugit facilis excepturi accusamus. Veritatis corrupti qui occaecati."
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.l2s.is/url/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "http://showy-paddock.net",
    "tags": [
        "dolores"
    ],
    "utmSource": "sint culpa Duis voluptate Excepteur",
    "utmMedium": "irure nostrud esse",
    "utmCampaign": "pariatur",
    "utmTerm": "esse",
    "utmContent": "Libero nam minus ducimus. Fugit facilis excepturi accusamus. Veritatis corrupti qui occaecati."
}'

Responses

🟢200URL updated successfully
application/json
Body
ok
boolean 
optional
Example:
true
response
object 
optional
message
string 
optional
Example:
Operation successful
data
object 
optional
Example
{
  "ok": true,
  "response": {
    "message": "Operation successful",
    "data": {}
  }
}
🟠400Validation Error
🟠401Unauthorized
🔴500Internal Server Error
Modified at 2024-06-17 11:46:02
Previous
Get URL details
Next
Get user settings
Built with