Retrieve all custom domain lists associated with a specific user.
Note: Upon creating your Foxly account, you will automatically receive two default domains provided by us.
For detailed information about the custom domain service, please consult this article.
Domain List API Documentation #
API Endpoint #
Method: GET
URL: /api/user/v1/domain_list
Request Example #
curl --location --request GET 'https://apiv2.foxlyme.com/api/user/v1/
domain_list?page=Number&limit=Number' \
--header 'api-key: API_KEY'
Query Parameters: #
page
(optional): The page number to retrieve.limit
(optional): The number of results to return per page.
Response Body:
{
"message": "Domain Fetch successfully",
"data": [
{
"_id": number,
"custom_404": null,
"custom_redirect_url": null,
"is_deleted": false,
"is_default": true,
"unverified_domain_send_mail": number,
"last_unverified_mail_sent_at": "String",
"verify_by": "string",
"ssl_setting": "isHttp",
"is_primary": false,
"isUpdatedFirstTime": false,
"is_paid_user": true,
"user_id": "S",
"domain": "string",
"status": "verified",
"domain_id": "string",
"created_at": "string",
"updated_at": "string",
"is_static": true,
"a_name": "string",
"set_primary": true,
"totalUrls": number
}
]
}
Response Fields: #
message
(string): Message indicating the result of the API call.data
(array): List of domain objects, each containing:_id
(number): Unique identifier for the domain.custom_404
(null): Custom 404 setting.custom_redirect_url
(null): Custom redirect URL.is_deleted
(boolean): Indicates if the domain is deleted.is_default
(boolean): Indicates if the domain is the default one.unverified_domain_send_mail
(number): Number of unverified domain emails sent.last_unverified_mail_sent_at
(string): Timestamp of the last unverified mail sent.verify_by
(string): Method of verification.ssl_setting
(string): SSL setting, e.g., “isHttp”.is_primary
(boolean): Indicates if the domain is primary.isUpdatedFirstTime
(boolean): Indicates if the domain was updated for the first time.is_paid_user
(boolean): Indicates if the user is a paid user.user_id
(string): User identifier.domain
(string): Domain name.status
(string): Status of the domain, e.g., “verified”.domain_id
(string): Domain identifier.created_at
(string): Creation timestamp.updated_at
(string): Last updated timestamp.is_static
(boolean): Indicates if the domain is static.a_name
(string): A name associated with the domain.set_primary
(boolean): Indicates if the domain is set as primary.totalUrls
(number): Total number of URLs associated with the domain.
Add Domain API Documentation #
API Endpoint #
Method: POST
URL: /api/user/v1/domain
Full Request Example:
curl --location --request POST 'https://apiv2.foxlyme.com/api/user/v1/domain' \
--header 'api-key: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"custom_404": "string",
"custom_redirect_url": "String",
"domain": "String",
"ssl_setting": "isHttp"
}'
Request Body: #
custom_404
(string): Add your custom 404 URL here.custom_redirect_url
(string): Add your custom redirect URL.domain
(string): Enter your domain.ssl_setting
(string): SSL setting options:isHttp
: If your domain is HTTP.hasSSL
: If your domain has an SSL certificate.foxlyEncrypt
: If you want to use Foxly SSL certificate.
Response Body: #
{
"error": false,
"message": "Domain Added successfully"
}
Response Fields: #
error
(boolean): Indicates whether there was an error.message
(string): Message indicating the result of the API call.
Edit Domain API Documentation #
API Endpoint #
Method: PUT
URL: /api/user/v1/domain
Full Request Example:
curl --location --request PUT 'https://apiv2.foxlyme.com/api/user/v1/domain?domain=string' \
--header 'api-key: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"custom_404": "string",
"custom_redirect_url": "string",
"domain": "string",
"ssl_setting": "string"
}'
Query Parameters: #
domain
(string): Enter your domain.domain_id
(string): Enter your domain ID.
Request Body: #
{
"custom_404": "string", // Add your custom 404 URL here
"custom_redirect_url": "string", // Add your custom redirect URL
"domain": "string", // Enter your domain
"ssl_setting": "string" // SSL setting options: "isHttp", "hasSSL", "foxlyEncrypt"
}
Response Body:
{
"error": false,
"message": "Domain Updated successfully"
}
Response Fields: #
error
(boolean): Indicates whether there was an error.message
(string): Message indicating the result of the API call.
Set Primary Domain API Documentation #
Description #
Use this API to set your primary domain. You can pass either the domain name or domain ID in the query parameter.
API Endpoint #
Method: PUT
URL: /api/user/v1/set_primary
Full Request Example:
curl --location --request PUT 'https://apiv2.foxlyme.com/api/user/v1/set_primary?domain=string' \
--header 'api-key: API_KEY'
Query Parameters: #
domain
(string): Enter your domain.domain_id
(string): Enter your domain ID.
Response Body: #
{
"error": false,
"message": "Primary domain set successfully"
}
Response Fields:
error
(boolean): Indicates whether there was an error.message
(string): Message indicating the result of the API call.Delete Domain API Documentation #
API Endpoint #
Method: DELETE
URL: /api/user/v1/domain
Full Request Example:
curl --location --request DELETE 'https://apiv2.foxlyme.com/api/user/v1/domain?domain=string' \
--header 'api-key: API_KEY'
Query Parameters: #
domain
(string): Enter your domain.domain_id
(string): Enter your domain ID.
Response Body: #
{
"error": false,
"message": "Domain Deleted successfully"
}
Response Fields: #
error
(boolean): Indicates whether there was an error.message
(string): Message indicating the result of the API call.
Domain URLs API Documentation #
API Endpoint #
Method: GET
URL: /api/user/v1/domain_urls
Full Request Example:
curl --location --request GET 'https://apiv2.foxlyme.com/api/user/v1/domain_urls?domain=string' \
--header 'api-key: API_KEY'
Query Parameters: #
domain
(string): Enter your domain.domain_id
(string): Enter your domain ID.
Response Body: #
{
"message": "Links fetch successfully",
"data": [
{
"_id": Number,
"status": 1,
"is_rotator": false,
"user_id": "9ece9275-b812-4cb3-895d-78341fb01225",
"long_url": "string",
"short_code": "string",
"short_url": "String",
"url_shortner_id": "String",
"rotating_urls": [],
"created_at": "string",
"totalClicks": number
}
// Additional URL objects as needed
]
}
Response Fields: #
message
(string): Message indicating the result of the API call.data
(array): List of URL objects, each containing:_id
(number): Unique identifier for the URL.status
(number): Status of the URL.is_rotator
(boolean): Indicates if the URL is a rotator.user_id
(string): User identifier.long_url
(string): The original long URL.short_code
(string): The short code for the URL.short_url
(string): The shortened URL.url_shortner_id
(string): Identifier for the URL shortener.rotating_urls
(array): List of rotating URLs (if any).created_at
(string): Creation timestamp.totalClicks
(number): Total number of clicks the URL has received.