API Reference
Links
POST - Shorten A Link

Shorten A Link

POST Shortens a long link to a shortened one.

Request

Body

NameTypeRequiredNotes
linkstringtrueThe long link you want to shorten
domainstringfalseThe domain name you want to use. Not the ID. If empty, zd.lc will be used
titlestringfalseThe title of your link

Example

curl -L -X PATCH 'https://prettyurl.net/api/v1/links' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <API_KEY>' \
-d '{
  "link": "string",
  "domain": "string",
  "title": "string",
}'

Response

Schema

link

KeyType
idstring
titlestring
domainstring
groupobject
back_halfstring
short_linkstring
original_linkstring
updated_atdatetime
created_atdatetime

Example

{
    "status": "success",
    "message": "API request processed successfully.",
    "data": {
        "link": {
            "id": string,
            "title": string,
            "domain": string,
            "group": {
                "id": string,
                "name": string,
                "created_at": datetime
            },
            "back_half": string,
            "short_link": string,
            "original_link": string,
            "updated_at": datetime,
            "created_at": datetime
        }
    }
}