Overview
The DotLynk API allows you to generate short links seamlessly. This API supports only the POST
method and returns responses in JSON format.
Endpoint
URL: https://www.dotlynk.com/api/request/v1/shorturlrequested
Method: POST
Headers
Include the following headers:
Content-Type: application/json Authorization: Bearer [Your-API-Token]
Request Body
Send the following JSON payload in your request:
{ "original_url": "https://example.com", // Required: URL to be shortened "custom_alias": "custom-alias" // Optional: Custom alias for the short URL }
Response
Successful Response:
{ "success": "Link Generated Successfully", "status_code": 200, "shortnerURL": "000F" }
Error Response:
{ "success": "Connect With DotLynk Team", "status_code": 403 }
Example Request
Using curl
:
curl -X POST https://www.dotlynk.com/api/request/v1/shorturlrequested \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -d '{ "original_url": "https://example.com", "custom_alias": "custom-alias" }'
Notes
- Make sure your
API Token
is valid and added to the Authorization header. - If no custom alias is provided, the system will generate a random alias.
- The maximum length for a custom alias is 15 characters.