Domains

Create domain

Create a new domain for the given environment. After creating the domain, you'll have to add the required DNS records to your DNS provider. This might be a 2-step process, depending on the verification method used. You can check the required DNS records in the response of this endpoint, and you can verify the domain using the "verify" query parameter in the "Get domain" endpoint.

post/environments/{environment}/domains

Request

  • Base URL
    https://cloud.laravel.com/api
  • Auth
    HTTP bearer

Path parameters

environmentstring required

The environment identifier

Request body

namestring required
www_redirect'root_to_www' | 'www_to_root'
wildcard_enabledboolean nullable

Whether to enable a wildcard subdomain (*.example.com) for this domain. Not supported on environments using a load balancer.

allow_downtimeboolean nullable

Whether to allow downtime during domain verification. When true (flexible), the domain can be pointed directly without pre-verification. When false (uninterrupted), the domain is pre-verified before traffic moves: TXT-based ownership pre-verification for "none" and "dns" strategies, certificate pre-issuance via DCV CNAMEs for "dns_proxy" (Cloudflare does not accept ownership tokens for proxied hostnames).

cloudflare_strategy'dns_proxy' | 'dns' | 'none'
verification_method'pre_verification' | 'real_time'

Example request

{
  "allow_downtime": true
}

Response

DomainResource

Changes

No recorded changes to this operation across all 1 revision of this API.