Skip to contentSkip to navigationSkip to topbar
On this page

List SendGrid Pre-built Designs



API Overview

api-overview page anchor

The Designs API offers the ability to manage assets stored in the Twilio SendGrid Design Library(link takes you to an external page).

The Design Library is a feature-rich email layout tool and media repository. You can build designs for all your email needs, including Single Sends, Automations, and Dynamic Templates.

You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started.

The Designs API provides a RESTful interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design.


GET/v3/designs/pre-builts

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

This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid.

Unlike the /designs endpoint where your designs are stored, a GET request made to designs/pre-builts will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library.

By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the page_size query parameter.

This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify.


Authentication

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

number of results to return

Minimum: 0Default: 100

page_tokenstringOptional

token corresponding to a specific page of results, as provided by metadata


summarybooleanOptional

set to false to return all fields

Default: true
200
SchemaExample
Property nameTypeRequiredDescriptionChild properties
resultarray[object]

_metadataobject
List SendGrid Pre-built DesignsLink to code sample: List SendGrid Pre-built Designs
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const queryParams = {
5
"page_size": 100,
6
"summary": true
7
};
8
9
const request = {
10
url: `/v3/designs/pre-builts`,
11
method: 'GET',
12
qs: queryParams
13
}
14
15
client.request(request)
16
.then(([response, body]) => {
17
console.log(response.statusCode);
18
console.log(response.body);
19
})
20
.catch(error => {
21
console.error(error);
22
});