POST
/
v1
/
apps
/
{id}
/
custom-domain
Attach Custom Domain to Application
curl --request POST \
  --url https://api.vertracloud.app/v1/apps/{id}/custom-domain \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "custom_domain": "<string>"
}'
{
  "status": "success"
}
id
string
required
The ID of the application to attach the custom domain to.
custom_domain
string
required
The custom domain to attach to the application (e.g., example.com). Use "@" to remove the custom domain.

Response

status
string
Indicates whether the call was successful. success if successful, error if not.
{
  "status": "success"
}

Error Responses

status
string
Indicates whether the call was successful. error if not successful.
code
string
The error code indicating the reason for failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.
  • PLAN_RESTRICTED_FEATURE: The user’s plan does not support custom domains.
  • INVALID_CUSTOM_DOMAIN: No custom domain was provided.
  • INVALID_CUSTOM_DOMAIN_FORMAT: The provided domain format is invalid.
  • FORBIDDEN_DOMAIN: The provided domain is restricted.
  • DOMAIN_ALREADY_IN_USE: The provided domain is already in use by another application.
  • APP_NOT_FOUND: The specified application does not exist or does not belong to the user.
  • USER_LIMITS_NOT_FOUND: The user’s plan limits could not be found.
  • NO_CONFIG_FILE: The application’s configuration file is missing.
  • INVALID_CONFIG: The application’s configuration file is invalid.
  • INVALID_MEMORY: The requested memory is invalid or exceeds plan limits.
  • FAILED_TO_REBUILD_APP: The application could not be rebuilt with the new configuration.
{
  "status": "error",
  "code": "UNAUTHORIZED"
}