An Integration is a connection from a SendGrid Marketing Campaign to a supported third-party application. Integrations with different external applications allow you to sync data and create a more cohesive cross-product data experience.
Currently, only Segment Integrations are supported. Segment Integrations allow you to customize and automate email event forwarding to your Segment account.
The Integrations API allows you to create, retrieve, update, and delete your Integrations.
This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations.
Bearer <<YOUR_API_KEY_HERE>>
application/json
The third-party application you would like to forward your events to.
Segment
The configurable filters for SendGrid to destination email event forwarding.
The properties of an Integration required to send events to a specific third-party application.
Optional
The nickname for the Integration.
Untitled Integration
Example: My New Segment Integration!
Successful Operation
Optional
The unique ID of an Integration.
12345
Optional
Your Twilio SendGrid account ID.
123456
Optional
The configurable filters for SendGrid to destination email event forwarding.
Optional
The properties of an Integration required to send events to a specific third-party application.
Optional
The nickname for the Integration.
Untitled Integration
Example: My New Segment Integration!
Optional
The third-party application you would like to forward your events to.
Segment
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const data = {5filters: {6email_events: ["click", "drop", "open", "processed", "delivered"],7},8destination: "Segment",9label: "optional label",10properties: {11destination_region: "US",12write_key: "a123456",13},14};1516const request = {17url: `/v3/marketing/integrations`,18method: "POST",19body: data,20};2122client23.request(request)24.then(([response, body]) => {25console.log(response.statusCode);26console.log(response.body);27})28.catch((error) => {29console.error(error);30});