Single Sends 2020 Update
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.
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.
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 for full documentation and code samples.
| Field: Existing Single Sends API | Field: Updated Single Sends API | Notes | Response or Request Field | Data Type |
|---|---|---|---|---|
name | name | Both | string | |
categories | categories | Both | array[string] | |
sender_id | sender_id | Moved to email_config: sender_id | Both | integer |
status | status | Response | string | |
custom_unsubscribe_url | email_config: custom_unsubscribe_url | Moved to email_config: custom_unsubscribe_url | Both | string |
id | id | Response | string | |
suppression_group_id | id | Moved to email_config: suppression_group_id | Both | integer |
filter: list_ids | send_to: list_ids | Moved to send_to: list_ids | Both | array[string] |
filter: send_to_all | send_to: all | Moved to send_to: all | Both | boolean |
send_at | send_at | Both | string | |
template_id | NA | string | ||
updated_at | updated_at | Response | string | |
created_at | created_at | Response | string | |
ip_pool | email_config: ip_pool | Moved to email_config: ip_pool | Both | string |
| NA | send_to: segment_ids | Both | array[string] | |
| NA | email_config: subject | Both | string | |
| NA | email_config: html_content | Both | string | |
| NA | email_config: plain_content | Both | string | |
| NA | email_config: generate_plain_content | Both | boolean | |
| NA | email_config: design_id | Request | string | |
| NA | email_config: editor | Both | string |