Custom Domains
A CustomDomain object represents an additional customer-owned domain that routes to a Files.com site.
List Custom Domains
SDK Method
customdomain.List()
Return Object
[]*CustomDomain
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Additional Arguments
Show Custom Domain
SDK Method
customdomain.Find()
Return Object
CustomDomain
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
CustomDomainFindParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Custom Domain ID. |
Create Custom Domain
SDK Method
customdomain.Create()
Return Object
CustomDomain
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
CustomDomainCreateParams Fields
| Field | Default | Description |
|---|---|---|
| Destination string | "site_alias" | Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, or unassigned (not routing traffic). Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.Possible values: site_alias, public_hosting, s3_endpoint, unassigned |
| FolderBehaviorId int64 | Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned. | |
| SslCertificateId int64 | Current SSL certificate ID. | |
| Domain string Required | Customer-owned domain name. |
Update Custom Domain
SDK Method
customdomain.Update()
Return Object
CustomDomain
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
CustomDomainUpdateParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Custom Domain ID. |
| Destination string | Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, or unassigned (not routing traffic). Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.Possible values: site_alias, public_hosting, s3_endpoint, unassigned |
| FolderBehaviorId int64 | Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned. |
| SslCertificateId int64 | Current SSL certificate ID. |
| Domain string | Customer-owned domain name. |
Delete Custom Domain
SDK Method
customdomain.Delete()
Return Object
No return value.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
CustomDomainDeleteParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Custom Domain ID. |
The CustomDomain Object
Some of the methods above return a CustomDomain object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| Id int64 | Custom Domain ID. |
| Domain string | Customer-owned domain name. |
| Destination string | Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, or unassigned (not routing traffic). Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.Possible values: site_alias, public_hosting, s3_endpoint, unassigned |
| DnsStatus string | Current DNS verification status. Possible values: disabled, correct, no_records, cname_wrong, a_record, caa_conflict |
| SslCertificateId int64 | Current SSL certificate ID. |
| BrickManaged boolean | Is this domain's SSL certificate automatically managed and renewed by Files.com? |
| FolderBehaviorId int64 | Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned. |
| CreatedAt date-time | When this Custom Domain was created. |
| UpdatedAt date-time | When this Custom Domain was last updated. |