LogoFreestyle
API Reference/Domains

Insert Domain Mapping

This will unmap any other deployment to this domain

POST/domains/v1/mappings/{domain}

Request Body

application/jsonRequired
deploymentIdRequiredstring
Format: "uuid"

Path Parameters

domainRequiredstring

Response Body

200

Successfully mapped domain to deployment

idRequiredstring
Format: "uuid"
domainRequiredstring
deploymentIdRequiredstring
Format: "uuid"
ownershipIdRequiredstring
Format: "uuid"
createdAtRequiredstring
Format: "date-time"

401

You do not have permission to do this

messageRequiredstring

422

Failed to provision certificate

messageRequiredstring

500

Failed to insert ownership

messageRequiredstring

502

Failed to check permissions

messageRequiredstring
curl -X POST "https://api.freestyle.sh/domains/v1/mappings/<string>" \
  -H "Content-Type: application/json" \
  -d '{
    "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2"
  }'

Successfully mapped domain to deployment

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "domain": "string",
  "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",
  "ownershipId": "489905e0-55cc-4cf9-b77b-c4db4f323c05",
  "createdAt": "2019-08-24T14:15:22Z"
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.