v13

OpenAPI 3.0.32026-07-31359869.4 MB
projects

Add a domain to a project

Add a domain to the project by passing its domain name and by specifying the project by either passing the project id or name in the URL. If the domain is not yet verified to be used on this project, the request will return verified = false, and the domain will need to be verified according to the verification challenge via POST /projects/:idOrName/domains/:domain/verify. If the domain already exists on the project, the request will fail with a 400 status code.

post/v10/projects/{idOrName}/domains

Path parameters

idOrNamestring required

The unique project identifier or the project name

The unique project identifier or the project name

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

namestring required

The project domain name

gitBranchstring nullable

Git branch to link the project domain

customEnvironmentIdstring

The unique custom environment identifier within the project

redirectstring nullable

Target destination domain for redirect

redirectStatusCodenull | 301 | 302 | 307 | 308 nullable

Status code for domain redirect

Example request

{
  "name": "www.example.com",
  "redirect": "foobar.com",
  "redirectStatusCode": 307
}

Response

The domain was successfully added to the project

namestring required
apexNamestring required
projectIdstring required
redirectstring nullable
redirectStatusCode301 | 302 | 307 | 308 | null nullable
gitBranchstring nullable
customEnvironmentIdstring nullable
updatedAtnumber
createdAtnumber
verifiedfalse | true required

true if the domain is verified for use with the project. If false it will not be used as an alias on this project until the challenge in verification is completed.