---
title: "Add Domain"
method: POST
path: "/v0/sites/{site_id}/environments/{env_id}/domains"
tags: ["sites"]
---

# Add Domain

`POST /v0/sites/{site_id}/environments/{env_id}/domains`

## Request

- Base URL: `https://api.pantheon.io`
- URL: `https://api.pantheon.io/v0/sites/{site_id}/environments/{env_id}/domains`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pantheon/apis/pantheon-public-api-service/docs/v0/sites/:site_id/environments/:env_id/domains/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds a custom domain to an environment.

## Path parameters

- `site_id` string, required
- `env_id` string, required

## Request body

- AddDomainRequest: AddDomainRequest represents a request to add a domain
  - `domain` string, required: The domain name to add (e.g., "example.com")

## Response `200`

- AddDomainResponse: AddDomainResponse represents the response after adding a domain
  - `domain` string, required: The domain that was added
  - `status` string, required: Status of the operation

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/pantheon/apis/pantheon-public-api-service.md) - [All operations](https://skmtc.dev/pantheon/apis/pantheon-public-api-service/llms.txt) - [OpenAPI document](https://skmtc.dev/pantheon/apis/pantheon-public-api-service/revisions/5d158d59f4c3?raw)
