Palbase Machines · API
/domainsAdd a domain to the environment
Adds a subdomain of the customer's own — auth.example.com — the environment answers its sign-in at too, once its owner has added the records the answer names to its DNS: its social providers' callbacks, its OpenID provider (issuer, discovery, authorize) and its hosted pages. It is the environment's own, neither a site's nor a machine's; an apex is refused (invalid_host), and it redirects nowhere. Refused when another environment has it (domain_taken), when it is one of the platform's, or past the project's domains, every environment's together: twenty on Free, a hundred on Pay as you go (too_many_domains). The environment signs in at it only once it is active and set so (PATCH /domains/{host}).
Called by your server, with the project's secret key.
Request body
hoststring · requiredThe domain: auth.example.com — a subdomain, none of the platform's own.curl -X POST "https://<your-ref>.palbase.studio/domains" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"host":"string"}'Responses
201The domain, pending
400Validation failed or a required field is missing
401Missing or invalid API key
403Not the project's secret key
409The project already has a machine of this name, or has as many machines as it may
429Over the project's request limit, or its machine time for this period is used up
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation AddEnvironmentDomain of machines's contract.