Skip to contentSkip to navigationSkip to topbar
On this page

Get Single Sends Search



API Overview

api-overview page anchor

A Single Send is a one-time, non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery.

Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates.

The Single Sends API allows you to create, retrieve, update, delete, schedule, and deliver your Single Sends. There are also endpoints for searching and statistics to help you maintain and alter your Single Sends as you learn more and further develop your campaigns.

The Single Sends API changed on May 6, 2020. Please check the SendGrid Knowledge Center for updates and instructions here: https://sendgrid.com/docs/for-developers/sending-email/single-sends-2020-update/


POST/v3/marketing/singlesends/search

Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)

This endpoint allows you to search for Single Sends based on specified criteria.

You can search for Single Sends by passing a combination of values using the name, status, and categories request body fields.

For example, if you want to search for all Single Sends that are "drafts" or "scheduled" and also associated with the category "shoes," your request body may look like the example below.

1
{
2
"status": [
3
"draft",
4
"scheduled"
5
],
6
"categories": [
7
"shoes"
8
],
9
}

Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
page_sizeintegerOptional

page_tokenstringOptional
Encoding type:application/json
Schema
Property nameTypeRequiredDescriptionChild properties
namestringOptional

leading and trailing wildcard search on name of the Single Send

Min length: 1Max length: 100

statusarray[enum<string>]Optional

current status of the Single Send

Possible values:
draftscheduledtriggered

categoriesarray[string]Optional

categories to associate with this Single Send, match any single send that has at least one of the categories

200404
SchemaExample
Property nameTypeRequiredDescriptionChild properties
resultarray[object]

_metadataobject
Get Single Sends SearchLink to code sample: Get Single Sends Search
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
5
const request = {
6
url: `/v3/marketing/singlesends/search`,
7
method: 'POST',
8
9
}
10
11
client.request(request)
12
.then(([response, body]) => {
13
console.log(response.statusCode);
14
console.log(response.body);
15
})
16
.catch(error => {
17
console.error(error);
18
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.