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

Get SendGrid Pre-built Design



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/{id}

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

This endpoint allows you to retrieve a single pre-built design.

A GET request to /designs/pre-builts/{id} will retrieve details about a specific pre-built design.

This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
idstring<uuid>required

The ID of the pre-built Design you want to duplicate.

200400404
SchemaExample
Property nameTypeRequiredDescriptionChild properties
namestring

The name of the new design.

Default: Duplicate: <original design name>

editorenum<string>

The editor used in the UI.

Possible values:
codedesign

html_contentstring

The HTML content of the Design.

Max length: 1048576

plain_contentstring

Plain text content of the Design.

Max length: 1048576Default: <generated from html_content if left empty>

Get SendGrid Pre-built Design

get-sendgrid-pre-built-design page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_19
const client = require('@sendgrid/client');
_19
client.setApiKey(process.env.SENDGRID_API_KEY);
_19
_19
const id = "f15982c1-a82c-4e87-a6b2-a4a63b4b7644";
_19
_19
const request = {
_19
url: `/v3/designs/pre-builts/${id}`,
_19
method: 'GET',
_19
_19
}
_19
_19
client.request(request)
_19
.then(([response, body]) => {
_19
console.log(response.statusCode);
_19
console.log(response.body);
_19
})
_19
.catch(error => {
_19
console.error(error);
_19
});


Rate this page: