Single Sends 2020 Update
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.
To improve your experience when working with the Single Sends API, Twilio SendGrid has streamlined the API’s request and response formats. You can now 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. To ease this transition, we initially released the updated API while continuing to provide the previous API at a new root path until June 6, 2020. The previous API should not be relied on after June 6, 2020 and will be removed. The information below outlines the changes between the two APIs to help you migrate your code if have not done so already.
Migrating to the new API
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
The new Single Sends API request and response bodies have been refined to contain only 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 provides the ability to send data that would currently be associated with a template. Rather than first creating a template and then passing a template ID to the Single Sends create endpoint, all template data can be passed 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.
Single Sends API fields
Field: Existing Single Sends API |
Field: Updated Single Sends API |
Notes |
Response or Request Field |
Data Type |
|
|
Both |
|
|
|
|
Both |
|
|
|
|
Moved to |
Both |
|
|
|
Response |
|
|
|
|
Moved to |
Both |
|
|
|
Response |
|
|
|
|
Moved to |
Both |
|
|
|
Moved to |
Both |
|
|
|
Moved to |
Both |
|
|
|
Both |
|
|
|
NA |
|
||
|
|
Response |
|
|
|
|
Response |
|
|
|
|
Moved to |
Both |
|
NA |
|
Both |
|
|
NA |
|
Both |
|
|
NA |
|
Both |
|
|
NA |
|
Both |
string |
|
NA |
|
Both |
|
|
NA |
|
Request |
|
|
NA |
|
Both |
|
Need some help?
We all do sometimes. Get help now from the Twilio SendGrid Support Team.
Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.