Manage your email campaigns and subscriber lists with SendGrid email delivery service
The SendGrid API allows you to send transactional and marketing emails programmatically. You can send emails to multiple recipients, use dynamic templates, attach files, schedule emails for future delivery, manage sender verification, and handle all aspects of email delivery with high reliability and scalability.
Required:
action
- The action to perform (send, list, get, verify)entity
- The entity type (email, template, sender)to
- Recipient email addressfrom
- Sender email addresssubject
- Email subject linecontent
- Email contentOptional:
cc
- Carbon copy recipientsbcc
- Blind carbon copy recipientstemplate_id
- Template ID for template-based emailsattachments
- File attachmentssend_at
- Scheduled send time (Unix timestamp)personalizations
- Personalization dataSend a basic email to multiple recipients including CC and BCC.
Parameters:
to
(required) - Primary recipient email addressfrom
(required) - Sender email addresssubject
(required) - Email subject linecontent
(required) - Email content with typecc
(optional) - Carbon copy recipientsbcc
(optional) - Blind carbon copy recipientsExample:
Response:
Send an email using a pre-built dynamic template.
Parameters:
to
(required) - Recipient email addressfrom
(required) - Sender email addresssubject
(required) - Email subject linetemplate_id
(required) - Template IDcontent
(optional) - Default content if template failspersonalizations
(optional) - Template variablesExample:
Response:
Send an email with file attachments.
Parameters:
to
(required) - Recipient email addressfrom
(required) - Sender email addresssubject
(required) - Email subject linecontent
(required) - Email contentattachments
(required) - Array of attachment objects with content, type, filename, and dispositionExample:
Response:
Send an email at a specific scheduled time.
Parameters:
to
(required) - Recipient email addressfrom
(required) - Sender email addresssubject
(required) - Email subject linecontent
(required) - Email contentsend_at
(required) - Unix timestamp for scheduled send timeExample:
Response:
Retrieve sender ID information by email address.
Parameters:
email
(required) - Sender email address to look upExample:
Response:
Retrieve a list of dynamic templates available in your SendGrid account.
Parameters:
generations
(optional) - Filter by template generation (dynamic, legacy)page_size
(optional) - Number of templates per pageExample:
Response:
All emails return HTTP 202 status for successful acceptance into the delivery queue. Content types include “text/plain” and “text/html”. Attachments must be base64 encoded. Scheduled emails use Unix timestamps for send_at parameter. Template IDs start with “d-” prefix for dynamic templates. Sender verification is required for “from” addresses. Supports both PinkConnect and Paragon proxy connections. Personalizations allow dynamic content insertion in templates. File attachments support various MIME types including application/pdf, image/jpeg, and application/octet-stream.