The Foxly URL shortener provides a convenient way to shorten URLs by replacing lengthy ones with a desired alias.
When you configure a custom domain name with Foxly URL shortener, it transforms into a branded or custom URL shortener. This means that all short links you create will stem from your custom domain, offering a personalized touch rather than using a generic domain.
If you’re unfamiliar with setting up a Custom Domain, refer to this informative article.
Here, you can perform various actions using the Foxly Developers APIs:
- Create a Short URL using Custom Domain Name:
- Create a Single Short URL: Shorten one long URL using the custom domain name.
- Create Multiple Short URLs: Shorten multiple long URLs using the custom domain name.
- Create Rotating Short URLs: Shorten multiple long URLs with the ability to set weightage percentages for each URL.
- Update Short URL:
- Update details of an existing short URL.
- Delete Short URL:
- Delete a specific short URL.
- Get Short URL:
- Retrieve a list of short URLs, including total URL counts and total clicks per URL.
Note:
- The custom domain name configured for the URL shortener must be associated with Foxly.
- You can shorten a maximum of 100 links per hour.
If you are not familiar with the Foxly URL shortener, please refer to this article.
Create a Single Link #
Convert a long URL to a Foxly short URL with additional parameters. If you exceed the hourly limit of 100 links, you may encounter an error: “Too many requests created from this Account; please try again after an hour.”
POST /v1/single
Request Body Schema:
curl --location --request POST 'https://apiv2.foxlyme.com/api/user/v1/single?domain_id=string' \
--header 'api-key: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"custom_code": "",
"password": "",
"expire_on": "",
"expiration_link": "",
"clicks": "",
"note": "",
"status": 1,
"utm": {
"utm_source": "",
"utm_medium": "",
"utm_campaign": ""
},
"long_url":""
}'
Response Body:
{
"error": false,
"message": "string",
"url_shortner_id": "string",
"url": "string"
}
Create Multiple Links #
Shorten up to 5 URLs simultaneously.
POST /v1/multiple
Request Body:
curl --location --request POST 'https://apiv2.foxlyme.com/api/user/v1/multiple?domain_id=string' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Accept-Language: en-US,en;q=0.9' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'api-key: API_KEY' \
--data-raw '{
"custom_code": "",
"password": "",
"expire_on": "",
"expiration_link": "",
"clicks": "",
"note": "",
"status": 1,
"utm": {
"utm_source": "",
"utm_medium": "",
"utm_campaign": ""
},
"long_url": [
"https://xyz.com/"
]
}'
Response Body:
{
"error": false,
"data": [
{
"url_shortner_id": "string",
"short_code": "string",
"short_url": "string",
"long_url": "string",
"created_at": "date"
}
],
"message": "url short successfully"
}
Create Rotating Links #
Combine multiple links into one rotating link, allowing up to 5 rotating URLs.
POST /v1/rotate
Request Body:
curl --location --request POST 'https://apiv2.foxlyme.com/api/user/v1/rotate?domain_id=string' \
--header 'api-key: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"custom_code": "",
"password": "",
"expire_on": "",
"expiration_link": "",
"clicks": "",
"note": "",
"status": 1,
"utm": {
"utm_source": "",
"utm_medium": "",
"utm_campaign": ""
},
"rotating_urls": [
{
"url":"https://foxlyme.com/",
"weight": 0
}
],
"redirection_mode": ""
}'
Response Body:
{
"error": false,
"message": "string",
"data": "string,
"url_shortner_id": "string"
}