Optionalasm?: { group_id: number; groups_to_display?: number[] }The unsubscribe group to associate with this email. See the Suppressions API to manage unsubscribe group IDs.
Optionalgroups_to_display?: number[]Optionalattachments?: {An array of objects where you can define any attachments to be included with the message. Each object contains a content property, which must be a Base64 encoded string of the attachment itself, and type, filename, disposition, and content_id properties that tell SendGrid how to handle the attachment.
Optionalbatch_id?: stringAn ID representing a batch of emails to be sent at the same time. Including a batch_id in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the Scheduled Sends API for more information about scheduling your email.
Optionalcategories?: string[]An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the custom_args property. A category name cannot exceed 255 characters. See Working with Categories for more information.
Optionalcontent?: { type: string; value: string }[]An array of objects, each containing a message body's content and MIME type. You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array.
Optionalcustom_args?: stringValues that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by custom_args set at the personalizations level. Total custom_args size may not exceed 10,000 bytes.
Format: email
Optionalname?: stringOptionalheaders?: Record<string, never>A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: x-sg-id, x-sg-eid, received, dkim-signature, Content-Type, Content-Transfer-Encoding, To, From, Subject, Reply-To, CC, BCC.
Optionalip_pool_name?: stringThe IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See IP Pools for more information.
Optionalmail_settings?: {A collection of different mail settings that you can use to specify how you would like this email to be handled. Mail settings provide extra functionality to your mail send. See Mail Settings for more information.
Optionalbypass_bounce_management?: { enable?: boolean }Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the bypass_list_management filter. See the the "Bypass suppressions" section of our Suppressions Overview for more about bypass filters.
Optionalenable?: booleanOptionalbypass_list_management?: { enable?: boolean }Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See the the "Bypass suppressions" section of our Suppressions Overview for more about bypass filters.
Optionalenable?: booleanOptionalbypass_spam_management?: { enable?: boolean }Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the bypass_list_management filter. See the the "Bypass suppressions" section of our Suppressions Overview for more about bypass filters.
Optionalenable?: booleanOptionalbypass_unsubscribe_management?: { enable?: boolean }Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the bypass_list_management filter. See the the "Bypass suppressions" section of our Suppressions Overview for more about bypass filters.
Optionalenable?: booleanOptionalfooter?: { enable?: boolean; html?: string; text?: string }Optionalenable?: booleanOptionalhtml?: stringOptionaltext?: stringOptionalsandbox_mode?: { enable?: boolean }Optionalenable?: booleanAn array of messages and their metadata. Each object within the personalizations array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See Personalizations for more information.
Optionalreply_to?: { email: string; name?: string }Format: email
Optionalname?: stringOptionalreply_to_list?: { email: string; name?: string }[]Optionalsend_at?: numberA unix timestamp allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the send_at property set at the personalizations level.
Optionalsubject?: stringThe global or message level subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in RFC 2822 for guidance on subject line character limits.
Optionaltemplate_id?: stringAn email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the personalizations or message level. If a template ID begins with d-, it is a dynamic template and will work with the dynamic_template_data property. If the template ID does not begin with d-, it is a standard SendGrid template and will work with the substitutions property. See How to Send an Email with Dynamic Templates for more information about working with templates.
Optionaltracking_settings?: {Settings to determine how you would like to track the metrics of how your recipients interact with your email. See Tracking Settings for more information.
Optionalclick_tracking?: { enable?: boolean; enable_text?: boolean }Optionalenable?: booleanOptionalenable_text?: booleanOptionalganalytics?: {Allows you to enable tracking provided by Google Analytics. See Google Analytics and SendGrid Statistics for more information about this property.
Optionalenable?: booleanOptionalutm_campaign?: stringOptionalutm_content?: stringOptionalutm_medium?: stringOptionalutm_source?: stringName of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email)
Optionalutm_term?: stringOptionalopen_tracking?: { enable?: boolean; substitution_tag?: string }Optionalenable?: booleanOptionalsubstitution_tag?: stringOptionalsubscription_tracking?: { enable?: boolean; html?: string; substitution_tag?: string; text?: string }Optionalenable?: booleanOptionalhtml?: stringOptionalsubstitution_tag?: stringOptionaltext?: string
Description
An object allowing you to specify how to handle unsubscribes. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. See Suppression Groups for more information.