Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Single Sends 2020 Update


(error)

Danger

Action required to ensure successful create, read, and update operations using the Single Sends API.

The Single Sends API has changed. Please check this page for instructions.

Twilio SendGrid streamlined the Single Sends API's request and response formats. You can pass all the required information to create a Single Send in one request, eliminating the need to first create a template.

These improvements require modifications to your code. The previous Single Sends API was removed on June 6, 2020. The information below outlines the changes between the two APIs to help you migrate your code if you have not done so already.


Migrating to the new API

migrating-to-the-new-api page anchor

New API available at: https://api.sendgrid.com/v3/marketing/singlesends

All requests to the /marketing/singlesends root path must use the updated request format. Any requests to /marketing/singlesends using the previous Single Sends format will result in a 400-level error.


API request and response bodies

api-request-and-response-bodies page anchor

The updated Single Sends API request and response bodies contain five top-level fields: name, categories, send_at, send_to, and email_config. Both send_to and email_config are object types containing additional fields.

The email_config field carries the data previously associated with a template. Rather than first creating a template and then passing a template ID to the Single Sends create endpoint, you can pass all template data in the initial request using the fields in the email_config object.

The table below provides a list of all available fields for both the existing API and updated API. Notes are made where fields have been reorganized in the schema. Please see our API reference(link takes you to an external page) for full documentation and code samples.

Single Sends API fields

single-sends-api-fields page anchor
Field: Existing Single Sends APIField: Updated Single Sends APINotesResponse or Request FieldData Type
namenameBothstring
categoriescategoriesBotharray[string]
sender_idsender_idMoved to email_config: sender_idBothinteger
statusstatusResponsestring
custom_unsubscribe_urlemail_config: custom_unsubscribe_urlMoved to email_config: custom_unsubscribe_urlBothstring
ididResponsestring
suppression_group_ididMoved to email_config: suppression_group_idBothinteger
filter: list_idssend_to: list_idsMoved to send_to: list_idsBotharray[string]
filter: send_to_allsend_to: allMoved to send_to: allBothboolean
send_atsend_atBothstring
template_idNAstring
updated_atupdated_atResponsestring
created_atcreated_atResponsestring
ip_poolemail_config: ip_poolMoved to email_config: ip_poolBothstring
NAsend_to: segment_idsBotharray[string]
NAemail_config: subjectBothstring
NAemail_config: html_contentBothstring
NAemail_config: plain_contentBothstring
NAemail_config: generate_plain_contentBothboolean
NAemail_config: design_idRequeststring
NAemail_config: editorBothstring