Shorten A Link
POST Shortens a long link to a shortened one.
Request
Body
Name | Type | Required | Notes |
---|---|---|---|
link | string | true | The long link you want to shorten |
domain | string | false | The domain name you want to use. Not the ID. If empty, zd.lc will be used |
title | string | false | The 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
Key | Type |
---|---|
id | string |
title | string |
domain | string |
group | object |
back_half | string |
short_link | string |
original_link | string |
updated_at | datetime |
created_at | datetime |
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
}
}
}