# Alibaba Cloud DirectMail API

> Alibaba Cloud DirectMail API on Apizie: 73 endpoints (Add IP Protection Information, Verify Reply Address, Sends emails in batches, Check Domain Status, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/cloud:aliyun-dm/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `cloud:aliyun-dm`
- Category: Cloud
- Status: byok
- Source: https://api.alibabacloud.com/product/dm
- Page: https://zieapi.vercel.app/api/cloud/aliyun-dm
- OpenAPI: https://zieapi.vercel.app/api/cloud/aliyun-dm/openapi.json

Alibaba Cloud OpenAPI for DirectMail (dm, version 2015-11-23). Calls are signed with ACS3-HMAC-SHA256 using your AccessKey ID and secret.

## Endpoints

### Add IP Protection Information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/add-ipfilter` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| IpAddress | string | yes | IP Address/IP Range/IP Segment |

### Verify Reply Address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/approve-reply-mail-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Ticket | string | yes | Email address Ticket credential, part of the string in the verification email's URL |

### Sends emails in batches
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/batch-send-mail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateName | string | no | The name of a pre-created and approved template |
| AccountName | string | yes | The sender address configured in the management console |
| ReceiversName | string | no | The name of a pre-created recipient list that has recipients uploaded. Note: The number of recipients in the list must not exceed the… |
| AddressType | integer | yes | Valid values: 0: random account 1: sender address |
| TagName | string | no | The tag name of the email |
| ReplyAddress | string | no | The reply-to address |
| ReplyAddressAlias | string | no | The alias of the reply-to address |
| ClickTrace | string | no | Valid values: 1: Enables data tracking. 0 (default): Disables data tracking |
| UnSubscribeLinkType | string | no | The type of the generated unsubscribe link. For more information, see https://help.aliyun.com/document_detail/2689048.html. Valid values:… |
| UnSubscribeFilterLevel | string | no | The filtering level. For more information, see https://help.aliyun.com/document_detail/2689048.html. Valid values: disabled: No filtering… |
| Headers | string | no | The email header settings. Both standard and non-standard fields must comply with the syntax requirements for headers defined in the… |
| IpPoolId | string | no | The ID of the dedicated IP address pool. Users who have purchased dedicated IP addresses can use this parameter to specify the outbound IP… |
| DomainAuth | string | no | Specifies whether to enable domain-level authentication. Valid values: true false Use this parameter only for domain-level authentication.… |
| TemplateContent | string | no | The custom email content. You can directly specify the content without creating a template in advance. Specify this parameter or… |
| Receivers | string | no | The recipient list. The number of recipients cannot exceed 100. Specify this parameter or ReceiversName. If both Receivers and… |

### Check Domain Status
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/check-domain` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| DomainId | integer | yes | Domain ID |

### Validate Reply-To Address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/check-reply-to-mail-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Lang | string | no | Language. en is English, and any other value or an empty value defaults to Chinese |
| Region | string | no | Region |
| MailAddressId | integer | yes | Sender Address ID |

### Disassociates a sender address from a configuration set
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-cancel-relation-from-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The ID of the configuration set. This parameter is required |
| FromAddress | string | no | The sender address. This parameter is required |

### Creates a configuration set. You can create up to 100 configuration sets
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-create` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | no | The name of the configuration set. This parameter is required. The name can be up to 50 characters in length and must be unique |
| IpPoolId | string | no | The ID of the IP pool to associate. This parameter is optional |
| Description | string | no | The description. The description can be up to 50 characters in length |
| IsPublicChannelBackoff | string | no | Specifies whether to fall back to the public channel for sending when the associated dedicated IP pool encounters issues. true (fall… |
| ValidationOption | string | no | The address validation options (JSON-encoded) |

### Deletes configuration sets
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-delete` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Ids | string | no | The IDs of the configuration sets. Separate multiple IDs with commas. This parameter is required |
| IsForce | string | no | Specifies whether to force delete the associations with sender addresses |

### Retrieves the details of a configuration set
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The configuration set ID. This parameter is required |

### Lists configuration sets
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageIndex | string | no | The page number, starting from 1. Required |
| PageSize | string | no | The number of entries per page. Required |
| Keyword | string | no | The keyword used to search by name |
| All | string | no | Specifies whether to query all configuration sets. Optional |

### Associates a configuration set with a sender address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-relation-from-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The ID of the configuration set. This parameter is required |
| FromAddress | string | no | The sender address. This parameter is required |

### Updates a configuration set
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/config-set-update` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The configuration set ID. This parameter is required |
| Name | string | no | The configuration name. This parameter is required. The name can be up to 50 characters in length and must be unique |
| IpPoolId | string | no | The ID of the associated IP pool. This parameter is optional |
| Description | string | no | The description. The description can be up to 50 characters in length |
| IsPublicChannelBackoff | string | no | Specifies whether to fall back to the public channel for sending when the associated dedicated IP pool encounters issues. true: The system… |
| ValidationOption | string | no | The address validation options (JSON-encoded) |

### Create Domain
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/create-domain` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| DomainName | string | yes | Domain name, length 1-50, can include numbers, uppercase letters, lowercase letters, ., and - |
| dkimSelector | string | no | The selector field in the DKIM protocol, used to identify a specific public key. It is recommended to leave it blank, as the system will… |

### Creates a sender address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/create-mail-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| AccountName | string | yes | The sender address |
| ReplyAddress | string | no | The reply-to address |
| Sendtype | string | yes | The type of email. Valid values: batch: batch email trigger: triggered email |
| AddressType | string | no | The type of the address to create. Valid values: EXTERNAL: The domain name of the address to create has not been created in this system.… |

### Create Receiver List
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/create-receiver` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| ReceiversName | string | yes | List name, must be unique, with a length of 1-30 characters |
| ReceiversAlias | string | yes | List alias, an email address less than 30 characters long |
| Desc | string | no | List description |

### Creates a tag
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/create-tag` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TagName | string | yes | The tag name. The name must be 1 to 128 characters long and can contain letters, digits, and underscores (_) |
| TagDescription | string | no | The description of the tag |

### Creates a new mail template in DirectMail
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/create-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateType | integer | no | The template type |
| TemplateName | string | yes | The template name |
| TemplateSubject | string | no | The email subject |
| TemplateNickName | string | no | The sender name |
| TemplateText | string | no | The email HTML body |
| SmsType | integer | no | Deprecated. This parameter is retained for backward compatibility |
| SmsContent | string | no | Deprecated. This parameter is retained for backward compatibility |
| Remark | string | no | Deprecated. This parameter is retained for backward compatibility |
| FromType | integer | no | Deprecated. This parameter is retained for backward compatibility |

### Create User's Invalid Address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/create-user-suppression` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Address | string | no | Email address or domain name |

### Sets auto-renewal for a dedicated IP address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-auto-renewal` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| BuyResourceIds | string | yes | The IDs of the purchased instances. Separate multiple IDs with commas |
| AutoRenewal | string | yes | Specifies whether to enable auto-renewal |

### Updates the prefetch method for a dedicated IP address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-change-warmup-type` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The ID of the dedicated IP address |
| WarmupType | string | no | The prefetch method |

### Lists purchased IPs
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageIndex | integer | no | The page index, starting from 1 |
| PageSize | integer | no | The page size |
| Keyword | string | no | The search keyword for IP addresses |

### Lists the IP addresses that are not assigned to any IP pool. This operation is used for IP pool configuration
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-none-pool-list` (byok)

### Creates a dedicated IP pool
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-pool-create` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Name | string | no | The name of the IP pool. The name must be 1 to 50 characters in length. It can contain letters, digits, underscores (_), and hyphens (-).… |
| BuyResourceIds | string | no | The IDs of the purchased IP instances. Separate multiple IDs with commas (,). You can obtain the instance IDs from the response of the… |

### Deletes a dedicated IP pool
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-pool-delete` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The IP pool ID |

### Lists IP pools
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-pool-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageIndex | integer | no | The page number. Pages start from 1 |
| PageSize | integer | no | The number of entries per page |
| Keyword | string | no | The keyword used to search by name |
| All | string | no | The full query flag |
| PoolId | string | no | The ID of the IP pool |

### Updates an IP pool
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/dedicated-ip-pool-update` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | string | no | The ID of the IP pool |
| BuyResourceIds | string | no | The IDs of the purchased IP instances. Separate multiple IDs with commas. Obtain these IDs from the response of the… |
| UpdateResource | string | no | Specifies whether to change the associated IP addresses. Set this parameter to true |

### Delete Domain
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-domain` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| DomainId | integer | yes | Domain ID |

### Remove invalid addresses from the invalid address database
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-invalid-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| ToAddress | string | no | Target address |

### Delete IP Protection Information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-ipfilter-by-edm-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| FromType | integer | no | Deprecated, kept for historical compatibility |
| Id | string | no | Record ID |

### Delete Mail Address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-mail-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| MailAddressId | integer | yes | Mail Address ID |

### Delete Receiver List
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-receiver` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| ReceiverId | string | yes | Receiver list ID |

### Delete a Single Recipient
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-receiver-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| ReceiverId | string | yes | Recipient list ID |
| Email | string | no | The single recipient to be deleted from the recipient list |

### Delete Tag
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-tag` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TagId | integer | yes | The ID of the tag |

### Queries template information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateId | integer | yes | The template ID |
| FromType | integer | no | The channel through which the user accesses the service. Default value: 1 |

### Deletes the verification file after the verification process is complete
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/delete-validate-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| FileId | string | no | The ID of the file that is returned after the task is submitted |

### Retrieves account information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/desc-account-summary` (byok)

### Configures a domain name
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/desc-domain` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| DomainId | integer | yes | The domain name ID. You can call the QueryDomainByParam operation to obtain the ID |
| RequireRealTimeDnsRecords | string | no | Specifies whether real-time DNS resolution is required |

### Queries template information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/desc-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateId | integer | yes | The template ID |
| FromType | integer | no | Deprecated. Retained for backward compatibility |

### Get IP Protection Information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-ip-protection` (byok)

### Retrieve IP Protection Information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-ipfilter-list` (byok)

### Retrieves email tracking and sending data
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-track-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| StartTime | string | yes | The start time. The time cannot be earlier than 30 days ago. Format: yyyy-MM-dd |
| EndTime | string | yes | The end time. The time span between the start time and the end time cannot exceed 7 days. Format: yyyy-MM-dd |
| Total | string | no | [Deprecated] |
| Offset | string | no | [Deprecated] The value is 0 for the first query and fixed to 1 for subsequent queries. A value of 1 indicates paging in chronological order |
| PageSize | string | no | The number of entries per page |
| OffsetCreateTime | string | no | [Deprecated] Used for pagination. Do not set this parameter for the first query. For subsequent queries, set this parameter to the value… |
| OffsetCreateTimeDesc | string | no | [Deprecated] |
| PageNumber | string | no | The page number |
| AccountName | string | no | The sender address. If you do not specify this parameter, all addresses are queried. If TagName is specified, this parameter cannot be empty |
| TagName | string | no | The tag name |
| DedicatedIpPoolId | string | no | The ID of the dedicated IP address pool. This parameter is available for users with dedicated IP addresses. If you do not specify this… |
| DedicatedIp | string | no | The dedicated IP address. This parameter is available for users with dedicated IP addresses. If you do not specify this parameter, data of… |
| Esp | string | no | The Email Service Provider (ESP). This parameter is available for users with dedicated IP addresses. Valid values: gmail.com yahoo.com… |
| ConfigSetId | string | no | The configuration set ID |
| Domain | string | no | The sender domain name |

### Retrieves email tracking data that meets specified conditions
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-track-list-by-mail-from-and-tag-name` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Total | string | no | (This field is deprecated) |
| StartTime | string | yes | The start time. The time cannot be earlier than 30 days ago. The format is yyyy-MM-dd |
| EndTime | string | yes | The end time. The time span between the start time and end time cannot exceed 15 days. The format is yyyy-MM-dd |
| Offset | string | no | The value is 0 for the first query and 1 for subsequent queries. A value of 1 indicates a paged query in chronological order. (This field… |
| PageSize | string | no | The number of entries per page |
| OffsetCreateTime | string | no | Used for paging. Do not set this parameter for the first query. For subsequent queries, set this parameter to the OffsetCreateTime value… |
| OffsetCreateTimeDesc | string | no | (This field is deprecated) |
| PageNumber | string | no | The current page number |
| AccountName | string | no | The sender address. If you leave this parameter empty, data for all addresses is returned. This parameter is required if you specify TagName |
| TagName | string | no | The email tag. If you leave this parameter empty, data for all tags is returned |
| DedicatedIpPoolId | string | no | The ID of the dedicated IP pool. This parameter is available only for users of dedicated IPs. If you do not specify this parameter, data… |
| DedicatedIp | string | no | The dedicated IP address. This parameter is available only for users of dedicated IPs. If you do not specify this parameter, data for all… |
| Esp | string | no | The Email Service Provider (ESP). This parameter is available only for users of dedicated IPs. Valid values: gmail.com yahoo.com… |
| ConfigSetId | string | no | The configuration set ID |

### Get Account Details
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-user` (byok)

### Retrieves the results file of a batch validation task
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-validate-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| FileId | string | no | The file ID returned after the task is submitted |

### Retrieves the status of a file validation task
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-validate-file-status` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| FileId | string | yes | The file ID returned after you submit the file for validation |

### Retrieves the email validation quota
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/get-validation-quota` (byok)

### Queries the email sending blacklist
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/list-block-sending` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| NextToken | string | no | The token used to start the query. If you do not specify this parameter, the query starts from the beginning of the results |
| MaxResults | integer | no | The maximum number of entries to return. Valid values: 1 to 500. |
| BlockType | string | yes | The type of block. UNSUB: Unsubscribe REPORT: Spam report |
| SenderEmail | string | no | The sender email address |
| BlockEmail | string | no | The recipient email address |
| BeginTime | integer | no | The start of the time range to query blocked emails |
| EndTime | integer | no | The end of the time range to query blocked emails |

### List User Invalid Addresses
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/list-user-suppression` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| StartCreateTime | integer | no | Start creation time, timestamp, accurate to the second |
| EndCreateTime | integer | no | End creation time, timestamp, accurate to the second. The span between start and end times cannot exceed 7 days |
| StartBounceTime | integer | no | Start time of the last bounce hit, timestamp, accurate to the second |
| EndBounceTime | integer | no | End time of the last bounce hit, timestamp, accurate to the second. The span between start and end times cannot exceed 7 days |
| Address | string | no | Email address or domain name |
| PageNo | integer | no | Current page number |
| PageSize | integer | no | Page size |

### Retrieves a list of uploaded validation files
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/list-validate-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| StartTime | string | yes | The start time. The time is in UTC and follows the RFC 3339 format |
| EndTime | string | yes | The end time. The time is in UTC and follows the RFC 3339 format |
| FileKeyword | string | no | A keyword in the file name |
| Page | integer | no | The page number |
| PageSize | integer | no | The number of entries per page |

### Modify the sending address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/modify-mail-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| MailAddressId | integer | yes | Sending address ID |
| ReplyAddress | string | no | Reply address |
| Password | string | no | Length should be 10 to 20 characters, and must include numbers, uppercase letters, and lowercase letters. Must contain at least 2 digits,… |

### Modify the domain-level password
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/modify-pwby-domain` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| DomainName | string | yes | Domain name, length 1-50, can include numbers, uppercase letters, lowercase letters, ., and - |
| Password | string | yes | Length should be between 10 to 20 characters, and must contain numbers, uppercase letters, and lowercase letters. At least 2 digits, 2… |

### Modify Tag
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/modify-tag` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TagId | integer | yes | Tag ID |
| TagName | string | yes | Tag Name |
| TagDescription | string | no | Tag Description |

### Modifies an email template
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/modify-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateId | integer | yes | The template ID |
| TemplateName | string | yes | The template name. Maximum length: 30 characters |
| TemplateSubject | string | no | The subject of the email template. This parameter is required only when the templatetype is email. Maximum length: 256 characters |
| TemplateNickName | string | no | The nickname of the template or the alias of the sender. This parameter is required only when the templatetype is email. Maximum length:… |
| TemplateText | string | no | The body content of the email. This parameter is required only when the templatetype is email. Maximum size: 1 MB |
| SmsType | integer | no | The business type of the SMS template. This parameter is required only when the templatetype is SMS |
| SmsContent | string | no | The body content of the SMS template. This parameter is required only when the templatetype is SMS. Length: 2 to 400 characters |
| Remark | string | no | The remarks or application description for the SMS template. This parameter is required only when the templatetype is SMS. Maximum length:… |
| FromType | integer | no | The source channel through which the user connects. Default value: 1 |

### Query domain information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-domain-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageNo | integer | no | Current page number. Default: 1 |
| PageSize | integer | no | Number of items per page, default: 10 |
| KeyWord | string | no | Domain name, length 1-50, can include numbers, uppercase and lowercase letters, ., - |
| Status | integer | no | 0 indicates normal 1 indicates abnormal |

### NextStart changed to string
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-invalid-address` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| StartTime | string | no | Start time, which cannot be earlier than 30 days ago, in the format yyyy-MM-dd |
| EndTime | string | no | End time, with a span from the start time that cannot exceed 30 days, in the format yyyy-MM-dd |
| KeyWord | string | no | Keyword. If not provided, it represents all invalid addresses |
| Length | integer | no | Number of items per request |
| NextStart | string | no | Request starting position |

### Queries the list of sender addresses
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-mail-address-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageNo | integer | no | The current page number. Default value: 1 |
| PageSize | integer | no | The number of entries per page. Default value: 10 |
| KeyWord | string | no | The email address. The value is 1 to 60 characters in length and can contain digits, letters, periods (.), hyphens (-), and at signs (@) |
| Sendtype | string | no | The type of the sender address. Valid values: batch: batch email trigger: triggered email |

### Retrieves recipient lists
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-receiver-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageNo | integer | no | This deprecated field is kept for backward compatibility. You can omit this parameter. The page number |
| PageSize | integer | no | The page size. Default value: 100. Omitting this parameter returns all results. However, because the PageNo parameter is deprecated, the… |
| KeyWord | string | no | The keyword to search for recipient lists. If omitted, all recipient lists are returned |
| Status | integer | no | This deprecated field is kept for backward compatibility. You can omit this parameter. The list status. Valid values: 0: uploading 1:… |

### Retrieve detailed information about a recipient list
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-receiver-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| ReceiverId | string | yes | Recipient list ID (returned when creating a recipient list using the CreateReceiver API) |
| PageSize | integer | no | Number of items per page, default: 10 |
| KeyWord | string | no | Recipient address, length 0-50 |
| NextStart | string | no | Starting position for the next item, default: 0 |

### Call QueryTagByParam to retrieve tags
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-tag-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageNo | integer | no | Page number |
| PageSize | integer | no | Page size |
| KeyWord | string | no | Tag name, length 1-50, defaults to all tags if not specified |

### Queries tasks based on specified parameters
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-task-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageNo | integer | no | The page number. Default value: 1 |
| PageSize | integer | no | The number of entries per page. Default value: 10 |
| KeyWord | string | no | The keyword for the query. If you leave this blank, all tasks are returned |
| Status | integer | no | The task status. If you leave this blank, tasks in all states are returned |

### Queries template list information by paging
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/query-template-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| PageNo | integer | no | The current page number. Default value: 1 |
| PageSize | integer | no | The number of entries per page. Default value: 20 |
| KeyWord | string | no | The keyword of the template name. By default, a paging query is performed on all templates |
| Status | integer | no | Deprecated. Retained for backward compatibility |
| FromType | integer | no | Deprecated. Retained for backward compatibility |

### Deletes system-identified and manually added addresses from the user-level suppression list
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/remove-user-suppression` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| SuppressionIds | string | no | The ID of the suppressed address. To specify multiple IDs, separate them with commas (,). Call the ListUserSuppression operation to obtain… |

### Create a single recipient
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/save-receiver-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| ReceiverId | string | yes | The ID of the recipient list |
| Detail | string | no | The recipient details. You can upload up to 500 recipients in a single request. The value is a string in a JSON array format. Each object… |
| CustomDetail | string | no | The recipient's email address and template parameters, in an array format |

### Sends a test email using a template
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/send-test-by-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateId | integer | yes | The template ID |
| AccountName | string | yes | The sender address. Maximum length: 60 characters |
| UserName | string | no | The user name. Maximum length: 30 characters |
| NickName | string | no | The nickname. Maximum length: 30 characters |
| Birthday | string | no | The birthday. Maximum length: 30 characters |
| Gender | string | no | The gender. Maximum length: 30 characters |
| Mobile | string | no | The mobile number. Maximum length: 30 characters |
| Email | string | yes | The recipient email address. Maximum length: 60 characters |
| TemplateParams | string | no | The custom parameters, formatted as a JSON string |

### You can upload the list of addresses to be verified
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/send-validate-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| FileUrl | string | yes | The URL of the file that contains the list of email addresses |
| FileName | string | yes | The name of the file that contains the list of email addresses |
| AddressColumn | integer | yes | The column that contains the email addresses in the file. The index starts from 1 |
| HasHeaderRow | string | yes | Specifies whether the first row is a table header |
| RemoveDuplicate | string | yes | Specifies whether to remove duplicate email addresses in the output file |

### Retrieves sending data based on specified conditions
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/sender-statistics-by-tag-name-and-batch-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| AccountName | string | no | The sender address. If this parameter is not specified, data for all addresses is returned |
| StartTime | string | yes | The start time. The time cannot be earlier than 90 days ago. Format: yyyy-MM-dd |
| EndTime | string | yes | The end time. The time span between the start time and end time cannot exceed 31 days. Format: yyyy-MM-dd |
| TagName | string | no | The email tag. If this parameter is not specified, data for all tags is returned |
| DedicatedIpPoolId | string | no | For dedicated IP users, specifies the ID of a dedicated IP pool to query data for. If this parameter is not specified, data for all… |
| DedicatedIp | string | no | For dedicated IP users, specifies a dedicated IP address to query data for. If this parameter is not specified, data for all dedicated IP… |
| Esp | string | no | For dedicated IP users, specifies a particular ESP to query data for. Valid values: gmail.com yahoo.com outlook.com icloud.com others:… |
| Domain | string | no | The sender domain name |

### Queries sending details
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/sender-statistics-detail-by-param` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| AccountName | string | no | The sender address. If you leave this parameter empty, emails from all sender addresses are queried. You can leave AccountName, TagName,… |
| ToAddress | string | no | The recipient address. If you leave this parameter empty, emails sent to all recipient addresses are queried |
| Status | integer | no | The delivery status. If you leave this parameter empty, emails in all delivery statuses are queried. Valid values: 0: delivered… |
| StartTime | string | no | The start time. The time range between the start time and the end time cannot exceed 30 days. The format is yyyy-MM-dd HH:mm |
| EndTime | string | no | The end time. The time range between the start time and the end time cannot exceed 30 days. The format is yyyy-MM-dd HH:mm |
| TagName | string | no | The email tag. If you leave this parameter empty, emails with all tags are queried. When you send an email using SMTP, specify the… |
| Length | integer | no | The number of results to return. The value can range from 1 to 100 |
| NextStart | string | no | The offset for this request, used for paging. If more results are available, set the \`NextStart\` parameter in your next request to this… |
| IpPoolId | string | no | The ID of the independent IP address pool |
| ConfigSetId | string | no | The ID of the configuration set |

### Sends a single email
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/single-send-mail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| AccountName | string | yes | The sender address configured in the management console |
| AddressType | integer | yes | The address type. Valid values: 0: random account 1: sender address |
| TagName | string | no | The tag created in the DirectMail console. Tags are used to categorize email batches. You can query the sending status of each batch by… |
| ReplyToAddress | string | yes | Specifies whether to use the reply-to address configured in the management console (the address must be verified). Valid values: true or… |
| ToAddress | string | yes | The destination address. You can specify multiple email addresses separated by commas. A maximum of 100 addresses are supported (mailing… |
| Subject | string | yes | The email subject. The value cannot exceed 256 characters in length |
| HtmlBody | string | no | The HTML body of the email. Note: HtmlBody and TextBody are used for different types of email content. You must specify one of them. The… |
| TextBody | string | no | The text body of the email. Note: HtmlBody and TextBody are used for different types of email content. You must specify one of them. The… |
| FromAlias | string | no | The sender nickname. The value cannot exceed 15 characters in length. For example, if the sender nickname is set to "Jane" and the sender… |
| ReplyAddress | string | no | The reply-to address |
| ReplyAddressAlias | string | no | The reply-to address nickname |
| ClickTrace | string | no | Specifies whether to enable data tracking. Valid values: 1: Enable data tracking. 0 (default): Disable data tracking |
| UnSubscribeLinkType | string | no | The type of unsubscribe link. Valid values: disabled: No unsubscribe link is generated. default: The default policy is used. An… |
| UnSubscribeFilterLevel | string | no | The filtering level. For more information, refer to https://help.aliyun.com/document_detail/2689048.html. Valid values: disabled: No… |
| Headers | string | no | The email header settings. Both standard and non-standard fields must comply with the syntax requirements for headers defined in the… |
| IpPoolId | string | no | The ID of the dedicated IP address pool. Users who have purchased dedicated IP addresses can use this parameter to specify the outbound IP… |
| Attachments | string | no | Supported only when using the new SDK. Not supported through OpenAPI or signature mechanism methods. For more information, refer to… |
| Template | string | no | The template information for template-based sending. When sending with a template, the HtmlBody and TextBody values are ignored… |
| BccAddress | string | no | Specifies the BCC (blind carbon copy) recipient list for the email. The system sends a copy identical to the main email content to each… |
| DomainAuth | string | no | Specifies whether to enable domain-level authentication. Valid values: true false Use this parameter only for domain-level authentication.… |

### Removes sending restrictions caused by unsubscribes or complaints
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/unblock-sending` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| SenderEmail | string | yes | The sender address |
| BlockEmail | string | yes | The blacklisted recipient address |
| BlockType | string | yes | The blacklist type. UNSUB: Unsubscribe REPORT: Complaint |

### Update IP Protection API
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/update-ip-protection` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| IpProtection | string | no | IP protection switch, On: 1 Off: 0 |

### Update account information
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/update-user` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| User | string | no | User Information (JSON-encoded) |

### Validates an email address
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/validate-email` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Email | string | yes | The email address to validate |
| Timeout | integer | no | The timeout period. Default value: 60 seconds |
| CheckGraylist | string | no | Specifies whether to check the graylist. Default value: false. The result is asynchronously notified through EventBridge |
| ProbeType | string | no | The probe type. Valid values: FULL: enables all detection capabilities, including SMTP probing. Because SMTP probing involves remote… |

### version
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/version` (byok)

## Example
```
curl "https://zieapi.vercel.app/v1/cloud:aliyun-dm/add-ipfilter" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Alibaba Cloud DirectMail API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/cloud:aliyun-dm/add-ipfilter with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Alibaba Cloud DirectMail API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Alibaba Cloud DirectMail itself also needs your own key from aliyuncs.com.

### Can AI agents use the Alibaba Cloud DirectMail API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key cloud:aliyun-dm.

### What is the status of the Alibaba Cloud DirectMail API?
Needs your own provider key (bring your own key)
