Shortener API Documentation
Learn how to shorten URLs using our API
Endpoint: /shortener/
POSTShorten URLs with the E-Z.host API
Headers
Name | Value | Description |
---|---|---|
Content-Type | application/json | The type of the request body. |
key | Your API key | Your API key for authentication. |
Request Body
json
{
"url": "https://example.com"
}
Example Request
bash
curl -X POST https://api.e-z.host/shortener \
-H "Content-Type: application/json" \
-H "key: YOUR_API_KEY" \
-d '{"url": "https://example.com"}'
Response
Successful response example:
json
{
"success": true,
"message": "URL Shortened",
"shortenedUrl": "https://i.e-z.gg/s/xyz123",
"deletionUrl": "https://i.e-z.gg/shortener/delete?key=random-deletion-key"
}
Error Handling
Possible error responses include:
- 400 Bad Request: Invalid URL format.
- 401 Unauthorized: Invalid API key.
- 422 Unprocessable Entity: Validation error due to missing or invalid parameters.
- 429 Too Many Requests: Rate limit exceeded.
Need Help?
If you need assistance with our Shortener API, feel free to:
- • Ask our Discord community and staff
- • Email us at [email protected]
- • Check our FAQ