Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Get All Categories



API Overview

api-overview page anchor

A Single Send is a one-time nonautomated 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/


GET/v3/marketing/singlesends/categories

Base url: https://api.sendgrid.com

This endpoint allows you to retrieve all the categories associated with your Single Sends.

This endpoint will return your latest 1,000 categories.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
200500
SchemaExample
Property nameTypeRequiredDescriptionChild properties
categoriesarray[string]

list of latest one thousand unique categories associated with all Single Sends in ascending order

Get All Categories

get-all-categories page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_18
const client = require('@sendgrid/client');
_18
client.setApiKey(process.env.SENDGRID_API_KEY);
_18
_18
_18
const request = {
_18
url: `/v3/marketing/singlesends/categories`,
_18
method: 'GET',
_18
_18
}
_18
_18
client.request(request)
_18
.then(([response, body]) => {
_18
console.log(response.statusCode);
_18
console.log(response.body);
_18
})
_18
.catch(error => {
_18
console.error(error);
_18
});


Rate this page: