The Designs API offers the ability to manage assets stored in the Twilio SendGrid Design Library.
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.
This endpoint allows you to retrieve a list of designs already stored in your Design Library.
A GET request to /designs
will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the /designs/pre-builts
endpoint, which is detailed below.
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.
Bearer <<YOUR_API_KEY_HERE>>
Optional
number of results to return
0
Default: 100
Optional
token corresponding to a specific page of results, as provided by metadata
Optional
set to false to return all fields
true
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const queryParams = {5page_size: 100,6summary: true,7};89const request = {10url: `/v3/designs`,11method: "GET",12qs: queryParams,13};1415client16.request(request)17.then(([response, body]) => {18console.log(response.statusCode);19console.log(response.body);20})21.catch((error) => {22console.error(error);23});