Domain Object
The Domain Object defines a custom or shared domain used for generating shortened URLs through the Shortener API.
Each domain determines the behavior of links under it — including how the system responds to expired links, missing links, security requirements, and link naming rules. The configuration also allows partners to define the scope of access (who can create links with that domain) and specify whether HTTPS is enforced.
A Domain Object includes the following key elements:
- A unique
domain_nameanddomain_sididentifier. - Rules for handling expired or missing links (
expired_mode,not_found_mode). - Optional custom pages and HTTP status codes for each case.
- Access control through the
scopeattribute. - Secure link configuration with the
secureattribute. - Optional
suffix_patternfilters for partial link matching.
This configuration ensures that all links created under a given domain follow consistent behavior and security policies.
Domain Object Attributes
The fields listed in the table below will be returned in a JSON object when a successful request has been made.
| Attribute | Data Type | Description |
|---|---|---|
| domain_name | string | The unique domain name. |
| domain_sid read only | string | The domain secure ID. |
| expired_mode | string | Determines whether to redirect or serve page contents directly if the link expires. Values accepted in this field are:
redirect_temporary. |
| expired_page | string | The content to serve when a link expires. |
| expired_status_code | integer | The status code to be returned if the expired_mode value is proxy_pass. Values accepted in this field are:
|
| minimum_length | integer | The shortest link that the system will create. The default value is 6. |
| not_found_mode | string | Determines whether to redirect or serve page contents directly if the link is not found. Values accepted in this field are:
redirect_temporary. |
| not_found_page | string | The content to serve when a link is not found. |
| not_found_status_code | integer | The status code to be returned if the not_found_mode value is proxy_pass. Values accepted in this field are:
|
| partner_sid read only | string | The secure ID of the partner associated with the domain. |
| scope | string | Determines who can create a link using the domain_sid . Values accepted in this field are:
children. |
| secure | string | Determines whether links returned should be prefixed with https. Values accepted in this field are:
disabled. |
| suffix_pattern | string | The regular expressions of suffixes allowed for partial links by the HTTP server. For example, .(.mp3|mp4) will allow file names ending in .mp3 or .mp4. By default, the server will not allow suffixes. |
Sample Domain Object
{
"domain_name": "newdomain.com",
"domain_sid": "a0625551-63de-428e-889d-2d467b4e77a3",
"expired_mode": "redirect_temporary",
"expired_page": null,
"expired_status_code": null,
"minimum_length": 6,
"not_found_mode": "redirect_temporary",
"not_found_page": null,
"not_found_status_code": null,
"partner_sid": "e00430c3-a7d0-4666-ab5c-f7202448382f",
"scope": "children",
"secure": "disabled",
"suffix_pattern": null
}