QuerySendDetails

更新时间:
复制 MD 格式

Queries the delivery records and status of SMS messages sent to a single phone number.

Operation description

  • This operation queries the details of SMS messages sent to a specific phone number on a given date. You can also provide the BizId to query a specific delivery record.

  • This operation queries delivery details for a single phone number at a time. To view delivery details in bulk, use the QuerySendStatistics operation to query delivery statistics, or log in to the Delivery Receipts page in the console.

QPS limit

The QPS limit for this operation is 5,000 requests per second per user. Calls that exceed this limit are throttled.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dysms:QuerySendDetails

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PhoneNumber

string

Yes

The phone number to query. The format is as follows:

  • For messages to the Chinese mainland, use an 11-digit phone number, such as 1390000****.

  • For international SMS, use the format: country/region code + phone number, such as 8520000****.

Note

You can specify only one phone number.

1390000****

BizId

string

No

The delivery receipt ID. This is the BizId returned in the response when you call the SendSms or SendBatchSms operation.

Note

You can specify only one BizId.

134523^435****

SendDate

string

Yes

The date when the SMS message was sent. You can query records from the past 30 days.

Format: yyyyMMdd, for example, 20250601.

20250601

PageSize

integer

Yes

The number of delivery records to return on each page.

Valid values: 1 to 50.

20

CurrentPage

integer

Yes

The current page number for paginated results.

1

You can visit the OpenAPI Portal to view SDK request examples for different languages.

Response elements

Element

Type

Description

Example

object

Code

string

The request status code.

  • OK indicates the request was successful.

  • For other error codes, see Error codes.

OK

Message

string

The description of the status code.

OK

RequestId

string

The request ID. This unique identifier is generated by Alibaba Cloud for each request and can be used for troubleshooting.

819BE656-D2E0-4858-8B21-B2E477085AAF

TotalCount

string

The total number of SMS messages sent.

Note
  • This value represents the number of submission attempts, not the number of units for billing.

1

SmsSendDetailDTOs

object

Contains the delivery details.

SmsSendDetailDTO

array<object>

The SMS delivery details.

object

ErrCode

string

The delivery status code from the carrier.

  • DELIVERED: The message was delivered successfully.

  • For failure codes, see Error codes.

DELIVERED

TemplateCode

string

The code of the message template.

Note

The TemplateCode parameter is not returned for test messages sent with the [Test] Alibaba Cloud signature and the [Test] Alibaba Cloud test template.

SMS_12231****

OutId

string

The external ID.

Note

This parameter is returned only if you specify the OutId parameter in the send request.

123

ReceiveDate

string

The time the message was received by the recipient's device.

2025-06-01 16:44:13

SendDate

string

The time the message was sent.

2025-06-01 16:44:10

PhoneNum

string

The recipient's phone number.

1390000****

Content

string

The message content.

【阿里云】验证码为:123,您正在登录,若非本人操作,请勿泄露

SendStatus

integer

The delivery status of the SMS message. Valid values include:

  • 1: The message is awaiting a delivery receipt.

  • 2: The message failed to be delivered.

  • 3: The message was delivered successfully.

3

Examples

Success response

JSON format

{
  "Code": "OK",
  "Message": "OK",
  "RequestId": "819BE656-D2E0-4858-8B21-B2E477085AAF",
  "TotalCount": "1",
  "SmsSendDetailDTOs": {
    "SmsSendDetailDTO": [
      {
        "ErrCode": "DELIVERED",
        "TemplateCode": "SMS_12231****",
        "OutId": "123",
        "ReceiveDate": "2025-06-01 16:44:13",
        "SendDate": "2025-06-01 16:44:10",
        "PhoneNum": "1390000****",
        "Content": "【阿里云】验证码为:123,您正在登录,若非本人操作,请勿泄露",
        "SendStatus": 3
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.