Skip to main content
POST
/
projects
/
{idOrName}
/
domains
cURL
curl --request POST \
  --url https://api.youappz.dev/projects/{idOrName}/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "alias": "<string>",
  "target": "<string>",
  "deploymentId": "<string>",
  "projectId": "<string>",
  "redirect": "<string>",
  "redirectStatusCode": 302
}
'
{
  "id": 123,
  "teamId": "<string>",
  "alias": "<string>",
  "domain": "<string>",
  "zoneId": "<string>",
  "target": "<string>",
  "redirect": "<string>",
  "redirectStatusCode": 302,
  "createdAt": 123,
  "updatedAt": 123,
  "createdBy": 123,
  "deploymentId": "<string>",
  "projectId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

idOrName
string
required

The unique project identifier or the project name

Example:

"prj_LLHUOMOoDlqOp8wPE4kFo9pE or my-project-name"

Query Parameters

teamId
string
required

The Team identifier or Team slug to perform the request on behalf of.

Example:

"team_xbtegd63gdg5636gdg"

Body

application/json
alias
string
required
target
string
required
deploymentId
string
required
projectId
string
required
redirect
string | null
redirectStatusCode
enum<string> | null

Status code for domain redirect

Available options:
301,
302,
307,
308
Example:

302

Response

The domain was successfully added to the project

id
number
required
teamId
string | null
required
alias
string
required
domain
string
required
zoneId
string
required
target
string
required
redirect
string | null
required
redirectStatusCode
enum<string> | null
required

Status code for domain redirect

Available options:
301,
302,
307,
308
Example:

302

createdAt
number
required
updatedAt
number
required
createdBy
number | null
required
deploymentId
string
required
projectId
string
required