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

Shorten a URL

POST
/url
This endpoint shortens a given long URL.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "url": "https://gregarious-corsage.info",
    "customKey": "sint aliqua ea laboris",
    "utmSource": "ut nostrud commodo",
    "utmMedium": "reprehenderit",
    "utmCampaign": "fugiat Excepteur esse aliquip cupidatat",
    "utmTerm": "occaecat est velit sint",
    "utmContent": "Vel tempore aspernatur amet. Voluptas tempora cupiditate amet totam reiciendis odit. Excepturi quae eum magni excepturi autem molestias non exercitationem. Et nesciunt at. A quam nam error dolore voluptatibus quod ut molestiae.",
    "title": "culpa quaerat veritatis",
    "tags": [
        "deleniti"
    ]
}

Request Code 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 POST 'https://api.l2s.is/url' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://gregarious-corsage.info",
    "customKey": "sint aliqua ea laboris",
    "utmSource": "ut nostrud commodo",
    "utmMedium": "reprehenderit",
    "utmCampaign": "fugiat Excepteur esse aliquip cupidatat",
    "utmTerm": "occaecat est velit sint",
    "utmContent": "Vel tempore aspernatur amet. Voluptas tempora cupiditate amet totam reiciendis odit. Excepturi quae eum magni excepturi autem molestias non exercitationem. Et nesciunt at. A quam nam error dolore voluptatibus quod ut molestiae.",
    "title": "culpa quaerat veritatis",
    "tags": [
        "deleniti"
    ]
}'

Responses

🟢200URL shortened successfully
application/json
Body

Example
{
    "ok": true,
    "response": {
        "message": "Operation successful",
        "data": {}
    }
}
🟠400Validation Error
🟠401Unauthorized
🔴500Internal Server Error
Modified at 2024-06-17 11:44:23
Next
Get URL details
Built with