All Products
Search
Document Center

:ModifyPWByDomain

Last Updated:Oct 29, 2025

You can call the ModifyPWByDomain operation to set the SMTP password for a domain name.

Debug

You can call this operation directly in OpenAPI Explorer. This eliminates the need to calculate the signature. After a successful call, OpenAPI Explorer automatically generates a software development kit (SDK) code example.

Request parameters

Name

Type

Required

Example

Description

DomainName

String

Yes

example.com

The domain name. The domain name can be 1 to 50 characters in length and can contain digits, uppercase letters, lowercase letters, periods (.), and hyphens (-).

Password

String

Yes

DM1mail1234

The password.

  • The password must be 10 to 20 characters in length and must contain digits, uppercase letters, and lowercase letters.

  • The password must contain at least two digits, two uppercase letters, and two lowercase letters. The password cannot be a repetition of a single character.

  • The password cannot be the same as the previous password.

Action

String

No

ModifyPWByDomain

A required parameter. Set the value to ModifyPWByDomain.

Response parameters

Name

Type

Example

Description

Code

String

OK

The status code.

Message

String

The request was successful.

The description of the status code.

RequestId

String

02B2A890-CBD8-4806-9BCA-C93190CE7EF6

The request ID.

Success

Boolean

true

Indicates whether the call was successful.

Examples

Request example

http(s)://dm.aliyuncs.com/?Action=ModifyPWByDomain
&DomainName=example.com
&Password=pwd
&<Common request parameters>

Response example

XML format

<ModifyPWByDomainResponse>
      <RequestId>02B2A890-CBD8-4806-9BCA-C93190CE7EF6</RequestId>
      <Code>OK</Code>
      <Message>xxx</Message>
      <Success>true</Success>
</ModifyPWByDomainResponse>

JSON format

{
    "Message":"xxx",
    "RequestId":"02B2A890-CBD8-4806-9BCA-C93190CE7EF6",
    "Success":"true",
    "Code":"OK"
}

Error codes

Error code

Description

HTTP status code

Semantics

InvalidDomainPassword.Malformed

The specified domain name is already in use.

400

The password format is invalid.

InvalidDomainPassword.equalcurrent

The password must be different from the current password.

400

The domain name format is invalid.

InvalidDomainName.Malformed

The specified domain name is invalid.

400

The new password cannot be the same as the current password.

InvalidDomain.NotFound

The specified domain does not exist.

404

The domain name does not exist.

InvalidDomainStatus.Malformed

The specified domain status is invalid.

400

The domain status is invalid.

InvalidDomainId.Malformed

The specified domain ID does not exist.

404

The domain ID is invalid.

For more information about error codes, see Error Center.