Domains
Add a custom domain
Adds a custom domain to the Pen's deployment. The answer lists every custom domain, with the DNS records to create so the new one verifies.
post/v2/pens/{id}/domains
Request
- Base URLhttps://api.codepen.io
- Auth
- HTTP bearer
- or API key in header X-API-Key
Request body
Example request
{
"host": "www.example.com"
}Response
The deployment's custom domains.
Example response
[
{
"dns": [
{
"name": "www",
"type": "CNAME",
"value": "custom.codepen.app"
}
]
}
]Changes
No recorded changes to this operation across all 1 revision of this API.