tencent cloud

Feedback

ListSendTasks

Last updated: 2023-06-12 16:22:44

1. API Description

Domain name for API request: ses.tencentcloudapi.com.

This API is used to query batch email sending tasks (including immediate, scheduled, and recurring tasks) by page. You can query task data including the number of emails requested to be sent, the number of sent emails, the number of cached emails, and task status.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ListSendTasks.
Version Yes String Common Params. The value used for this API: 2020-10-02.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Offset Yes Integer Offset, starting from 0. The value is an integer. 0 means to skip 0 entries.
Limit Yes Integer Number of records to query. The value is an integer not exceeding 100.
Status No Integer Task status. 1: to start; 5: sending; 6: sending suspended today; 7: sending error; 10: sent. To query tasks in all states, do not pass in this parameter.
ReceiverId No Integer Recipient group ID
TaskType No Integer Task type. 1: immediate; 2: scheduled; 3: recurring. To query tasks of all types, do not pass in this parameter.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number
Data Array of SendTaskData Data record
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying tasks

Input Example

POST / HTTP/1.1
Host: ses.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ListSendTasks
<Common request parameters>

{
    "Status": 1,
    "Offset": 1,
    "Limit": 1,
    "ReceiverId": 123,
    "TaskType": 1
}

Output Example

{
    "Response": {
        "TotalCount": 1,
        "Data": [
            {
                "CacheCount": 1,
                "UpdateTime": "2021-09-09 10:10:10",
                "SendCount": 1,
                "TimedParam": {
                    "BeginTime": "2021-09-09 10:10:10"
                },
                "FromEmailAddress": "abc@cd.com",
                "TaskStatus": 1,
                "ReceiverId": 1,
                "RequestCount": 1,
                "TaskId": "123",
                "TaskType": 1,
                "Template": {
                    "TemplateData": "{\"name\":\"name\"}",
                    "TemplateID": 1
                },
                "CycleParam": {
                    "IntervalTime": 1,
                    "BeginTime": "2021-09-09 10:10:10",
                    "TermCycle": 1
                },
                "CreateTime": "2021-09-09 10:10:10",
                "Subject": "Email subject",
                "ErrMsg": "",
                "ReceiversName": "Name"
            }
        ],
        "RequestId": "xx"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.InvalidLimit Reached the query limit (100).
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support