URL-shortening
  1. URLs
URL-shortening
  • Users
    • User signup
      POST
    • User login
      GET
    • Update user account
      PUT
  • URLs
    • Create short URL
      POST
    • Short url redirect
      GET
    • Get Url(s)
      GET
    • Delete short URL
      DELETE
  1. URLs

Create short URL

POST
/url
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/url' \
--header 'token;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "string"
}'
Response Response Example
201 - Example 1
{
    "message": "URL created successfuly",
    "url": "https://127.0.0.1:8000/66e261e8bd5ba"
}

Request

Header Params
token
string 
optional
Body Params application/json
url
string <url>
required
Examples

Responses

🟢201Created
application/json
Body
message
string 
required
short_url
string 
required
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2025-05-27 06:08:47
Previous
Update user account
Next
Short url redirect
Built with