# Change Primary Domain

Change primary domain of the application. you can't change the primary domain of the application if you don't Created another domain in that application.

# HTTP Request:

PATCH https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/application-domains/{application_domain}

# Parameter:

Parameters Required Type Description
is_wordpress_url_update Yes Boolean true, If application type is wordpress.
forceHttps No Boolean true, If you want to force https while is_wordpress_url_update is true.

# Curl Request Example:

curl --request PATCH \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/application-domains/{application_domain}" \
  --header 'content-type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' \
  --data '{
    "is_wordpress_url_update": 0
  }'

# Response:

# Application Primary Domain Change

  • 200 (Ok)
{
  "primary_domain": "test.siteexample.tk",
  "message": "Primary domain changed successfully."
}

# Application Domain Not Found

  • 404 (Not Found)
{
    "message": "Application domain not found!"
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Server Error

  • 500 (Internal Server Error)
{
    "message": "Something went really wrong!"
}
Last Updated: 7/17/2024, 12:33:09 PM