# Create

Add a new application domain for the application.

# HTTP Request:

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

# Parameter:

Parameters Required Type Description
domain Yes String Additional domain/subdomain for your application.

# Curl Request Example:

curl --request POST \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/application-domains" \
  --header 'content-type: application/json' \
  --header 'accept: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' \
  --data '{
    "domain" : "test.siteexample.tk"
  }'

# Response:

# Application Domain Create

200 (Ok)

{
  "message": "Domain has been successfully added.",
  "application_domain": {
        "id": 131,
        "application_id": 110,
        "domain": "test.siteexample.tk",
        "dns_propagation": 0,
        "autossl": 0,
        "created_at": "2023-03-20 17:15:38",
        "updated_at": "2023-03-20 17:15:38"
    }
}

# Duplicate Domain

  • 500 (Internal Server Error)
{
    "message": "Duplicate domain name found for this server."
}

# Organization Not Found

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

# Application Not Found

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

# ServerAvatar Test Domain

  • 500 (Internal Server Error)
{
    "message": "You can not add additional ServerAvatar Test domain in application domains section."
}

# Server Not Found

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

# Server Error

  • 500 (Internal Server Error)
{
    "message": "Something went really wrong!"
}
Last Updated: 3/20/2023, 12:03:24 PM