### .NET Quickstart Example Source: https://resend.com/docs/introduction This example demonstrates sending an email with Resend using .NET. Ensure you have the Resend .NET SDK installed. ```csharp using Resend; using Resend.Models; public class EmailSender { public async Task SendEmailAsync(string to, string subject, string htmlContent) { var resend = new Resend(Environment.GetEnvironmentVariable("RESEND_API_KEY")); var sendRequest = new SendEmailRequest { From = "Acme ", To = new List { to }, Subject = subject, Html = htmlContent }; try { var response = await resend.Emails.Send(sendRequest); Console.WriteLine($"Email sent successfully. ID: {response.Id}"); } catch (ResendException ex) { Console.WriteLine($"Error sending email: {ex.Message}"); } } } ``` -------------------------------- ### Go Quickstart Example Source: https://resend.com/docs/introduction This example demonstrates sending an email with Resend using Go. Ensure you have the Resend Go SDK installed. ```go package main import ( "fmt" "log" "os" "github.com/resend/resend-go/v2" ) func main() { apiKey := os.Getenv("RESEND_API_KEY") if apiKey == "" log.Fatal("RESEND_API_KEY environment variable not set") resendClient := resend.NewResend(apiKey) params := &resend.SendEmailRequest{ From: "Acme ", To: []string{"delivered@resend.dev"}, Subject: "Hello world", Html: "Congratulations on sending your first email!", } s_, err := resendClient.Emails.Send(params) if err != nil { log.Fatalf("Error sending email: %v", err) } fmt.Printf("Email sent successfully: %+v\n", s_) } ``` -------------------------------- ### Ruby Quickstart Example Source: https://resend.com/docs/introduction This example demonstrates sending an email with Resend using Ruby. Make sure to install the Resend Ruby gem. ```ruby require "resend" resend = Resend::Client.new(api_key: ENV["RESEND_API_KEY"]) begin response = resend.emails.send_email({ from: "Acme ", to: ["delivered@resend.dev"], subject: "Hello world", html: "Congratulations on sending your first email!", }) puts response.inspect rescue Resend::APIError => e puts "Email sending failed: #{e.message}" end ``` -------------------------------- ### Elixir Quickstart Example Source: https://resend.com/docs/introduction This example demonstrates sending an email with Resend using Elixir. Ensure you have the Resend Elixir client installed. ```elixir alias Resend.Emails {:ok, _} = Emails.send( from: "Acme ", to: "delivered@resend.dev", subject: "Hello world", html: "Congratulations on sending your first email!" ) ``` -------------------------------- ### CLI Quickstart Example Source: https://resend.com/docs/introduction This snippet shows how to send an email using the Resend CLI. Ensure you have the Resend CLI installed and configured with your API key. ```bash resend emails send \ --from "Acme " \ --to "delivered@resend.dev" \ --subject "Hello world" \ --html "Congratulations on sending your first email!" ``` -------------------------------- ### PHP Quickstart Example Source: https://resend.com/docs/introduction This snippet shows how to send an email using Resend with PHP. Ensure you have the Resend PHP SDK installed. ```php emails->send([ 'from' => 'Acme ', 'to' => ['delivered@resend.dev'], 'subject' => 'Hello world', 'html' => 'Congratulations on sending your first email!', ]); print_r($response); } catch (Exception $e) { die('Email sending failed: ' . $e->getMessage()); } ?> ``` -------------------------------- ### Python Quickstart Example Source: https://resend.com/docs/introduction This snippet shows how to send an email using Resend with Python. Ensure you have the Resend Python SDK installed. ```python from resend import Resend resend = Resend("YOUR_API_KEY") try: response = resend.emails.send( { "from": "Acme ", "to": ["delivered@resend.dev"], "subject": "Hello world", "html": "Congratulations on sending your first email!", } ) print(response) except Exception as e: print(f"Email sending failed: {e}") ``` -------------------------------- ### Express Quickstart Example Source: https://resend.com/docs/introduction This example demonstrates sending an email with Resend using Express.js. Make sure to install the Resend Node.js SDK. ```javascript import express from "express"; import { Resend } from "resend"; const app = express(); const port = process.env.PORT || 3000; const resend = new Resend(process.env.RESEND_API_KEY); app.use(express.json()); app.post("/send-email", async (req, res) => { try { const { to, subject, html } = req.body; const data = await resend.emails.send({ from: "Acme ", to: [to], subject: subject, html: html, }); res.status(200).json(data); } catch (error) { res.status(400).json(error); } }); app.listen(port, () => { console.log(`Server listening on port ${port}`); }); ``` -------------------------------- ### Node.js Quickstart Example Source: https://resend.com/docs/introduction This snippet demonstrates how to send an email using Resend with Node.js. Ensure you have the Resend Node.js SDK installed. ```javascript import Resend from "resend"; const resend = new Resend(process.env.RESEND_API_KEY); async function sendEmail() { try { const data = await resend.emails.send({ from: "Acme ", to: ["delivered@resend.dev"], subject: "Hello world", html: "

Congrats on sending your first email!

", }); console.log(data); } catch (error) { console.error(error); } } sendEmail(); ``` -------------------------------- ### Laravel Quickstart Example Source: https://resend.com/docs/introduction This example demonstrates sending an email with Resend in a Laravel application. It assumes you have the Resend Laravel package installed. ```php */ public function attachments(): array { return []; } } ``` -------------------------------- ### Java Automation Example Source: https://resend.com/docs/dashboard/automations/introduction A basic Java example demonstrating the Resend SDK setup. This includes importing the Resend library and initializing the client. ```java import com.resend.*; public class Main { public static void main(String []args) { Resend resend = ``` -------------------------------- ### Create Automation Example Source: https://resend.com/docs/api-reference/automations/create-automation This example demonstrates how to create a new automation with a 'Welcome series' name, set to disabled, and configured with a 'start' event trigger. ```APIDOC ## POST /automations ### Description Creates a new automation. ### Method POST ### Endpoint /automations ### Request Body - **name** (string) - Required - The name of the automation. - **status** (AutomationStatus) - Optional - The status of the automation (e.g., ENABLED, DISABLED). - **steps** (AutomationStep[]) - Required - An array of automation steps. - **AutomationStep.trigger** (string) - Required - Defines the trigger for the automation step. - **AutomationStep.eventName** (string) - Required - The name of the event that triggers this step. ### Request Example ```json { "name": "Welcome series", "status": "DISABLED", "steps": [ { "trigger": "start", "eventName": "user_signed_up" } ] } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the created automation. - **name** (string) - The name of the automation. - **status** (AutomationStatus) - The status of the automation. - **steps** (AutomationStep[]) - An array of automation steps. #### Response Example ```json { "id": "aa123456-7890-abcd-ef12-34567890abcd", "name": "Welcome series", "status": "DISABLED", "steps": [ { "trigger": "start", "eventName": "user_signed_up" } ] } ``` ``` -------------------------------- ### Install Resend CLI with cURL Source: https://resend.com/docs/cli Use this command to install the Resend CLI using cURL. This is a quick way to get started. ```shellscript curl -fsSL https://resend.com/install.sh | sh ``` -------------------------------- ### Database Setup Source: https://resend.com/docs/webhooks/ingester Set up your database by running the provided schema. Use the appropriate flag for your chosen database. ```bash pnpm db:setup --postgresql ``` -------------------------------- ### Java Quickstart Example Source: https://resend.com/docs/introduction This snippet shows how to send an email using Resend with Java. Ensure you have the Resend Java SDK added to your project. ```java import io.resend.core.ResendClient; import io.resend.core.ResendConfig; import io.resend.core.models.SendEmailRequest; import io.resend.core.models.SendEmailResponse; public class SendEmail { public static void main(String[] args) { String apiKey = System.getenv("RESEND_API_KEY"); if (apiKey == null) { System.err.println("RESEND_API_KEY environment variable not set."); return; } ResendConfig config = ResendConfig.builder().apiKey(apiKey).build(); ResendClient client = new ResendClient(config); SendEmailRequest sendEmailRequest = SendEmailRequest.builder() .from("Acme ") .to(java.util.Collections.singletonList("delivered@resend.dev")) .subject("Hello world") .html("Congratulations on sending your first email!") .build(); try { SendEmailResponse response = client.sendEmail(sendEmailRequest); System.out.println("Email sent successfully: " + response.getId()); } catch (Exception e) { System.err.println("Error sending email: " + e.getMessage()); e.printStackTrace(); } } } ``` -------------------------------- ### Database Setup Source: https://resend.com/docs/webhooks/ingester Set up your database and run the provided schema. The ingester supports various databases including PostgreSQL, MySQL, and MongoDB. ```text Set up your database and run the provided schema for your database. The ingester supports PostgreSQL, MySQL, MongoDB, and several data warehouses. ``` -------------------------------- ### Get Topic in C# Source: https://resend.com/docs/api-reference/topics/get-topic Retrieve a topic using the `ResendClient.Create()` method and then calling `topics.get()` with the topic ID. This example assumes you have the Resend SDK installed. ```csharp using Resend; IResend resend = ResendClient.Create("re_xxxxxxxxx"); var topic = await resend.topics.get("b6d24b8e-af0b-4c3c-be0c-359bbd97381e"); ``` -------------------------------- ### Go SDK Example Source: https://resend.com/docs/dashboard/audiences/properties This Go code snippet demonstrates how to set up the Resend client with necessary imports and a basic main function. It includes context and API key placeholders. ```go package main import ( "context" "fmt" "github.com/resend/resend-go/v3" ) func main() { ctx := context.TODO() apiKey := } ``` -------------------------------- ### Get Contact Topics (Node.js) Source: https://resend.com/docs/api-reference/contacts/get-contact-topics Example of fetching contact topics using the Resend Node.js SDK. Ensure you have the SDK installed and your API key configured. ```javascript import Resend from "resend"; const resend = new Resend("YOUR_API_KEY"); async function getContactTopics(contactId) { try { const data = await resend.contacts.getTopics(contactId); console.log(data); return data; } catch (error) { console.error(error); return null; } } // Example usage: // getContactTopics("contact_id_here"); ``` -------------------------------- ### Get Automation Runs in Rust Source: https://resend.com/docs/dashboard/automations/runs Example of how to use the Resend Rust SDK to fetch automation runs. This snippet demonstrates basic setup and function calls. ```rust use resend::{ Resend, Result }; #[tokio::main] async fn main() -> Result { let resend = Resend::new("re_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); let runs = resend.automations().list("cmp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx").await?; println!("{:?}", runs); Ok(()) } ``` -------------------------------- ### Set Up Database Schema Source: https://resend.com/docs/llms-full.txt Set up your database by running the appropriate schema setup command for your chosen database. Supported databases include PostgreSQL, MySQL, and MongoDB. ```bash pnpm db:setup --postgresql # or use a different flag for a different database ``` -------------------------------- ### Start Development Server Source: https://resend.com/docs/dmarc-analyzer Launch the application's development server using your chosen package manager (pnpm, npm, yarn, or bun). ```bash bash pnpm run dev ``` ```bash bash npm run dev ``` ```bash bash yarn run dev ``` ```bash bash bun run dev ``` -------------------------------- ### Get Topic Example Source: https://resend.com/docs/api-reference/topics/get-topic This example demonstrates how to get a topic using the Resend Java SDK. ```APIDOC ## GET /topics/{topicId} ### Description Retrieves a specific topic by its ID. ### Method GET ### Endpoint /topics/{topicId} ### Parameters #### Path Parameters - **topicId** (string) - Required - The unique identifier of the topic to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the topic. - **data** (object) - The data associated with the topic. - **createdAt** (string) - The timestamp when the topic was created. - **updatedAt** (string) - The timestamp when the topic was last updated. ### Request Example ```java Resend resend = new Resend("re_xxxxxxxxx"); GetTopicResponseSuccess topic = resend.topics().get("b6d24b8e-af0b-4c3c-be0c-359bbd97381e"); ``` ### Response Example ```json { "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "data": {}, "createdAt": "2024-01-01T12:00:00Z", "updatedAt": "2024-01-01T12:00:00Z" } ``` ``` -------------------------------- ### Node.js SMTP Example Source: https://resend.com/docs/send-with-smtp Send an email using Node.js with the Nodemailer library. Ensure you have Nodemailer installed (`npm install nodemailer`). ```javascript import nodemailer from 'nodemailer'; const transporter = nodemailer.createTransport({ host: 'smtp.resend.com', port: 465, secure: true, auth: { user: 'resend', pass: 'YOUR_API_KEY', }, }); async function sendEmail() { try { const mailOptions = { from: 'you@example.com', to: 'recipient@example.com', subject: 'Hello from Resend!', html: '

This is a test email sent via Resend SMTP.

', }; const info = await transporter.sendMail(mailOptions); console.log('Email sent: %s', info.messageId); } catch (error) { console.error('Error sending email:', error); } } sendEmail(); ``` -------------------------------- ### Go SDK Template Example Source: https://resend.com/docs/dashboard/templates/introduction Example of initializing the Resend Go SDK client and preparing parameters for sending an email. Ensure you have the correct API key and import path. ```go import "github.com/resend/resend-go/v3" client := resend.NewClient("re_xxxxxxxxx") params := &resend.SendEmailRequest{ From: "Acme ", To: []string{"delivered@resend.dev"}, Subject: "Awesome from Resend", Html: "it works!", } res, err := client.Email.Send(params) if err != nil { panic(err) } fmt.Println(res.Id) ``` -------------------------------- ### Go Automation Example Source: https://resend.com/docs/dashboard/automations/introduction This Go snippet shows how to initialize the Resend client and list automation runs. Ensure you have the Resend Go SDK imported. ```go package main import ( "fmt" "github.com/resend/resend-go/v3" ) func main() { client := resend.NewClient("re_xxxxxxxxx") automatons, err := client.Automations.List( &resend.ListAutomationsParams{ // You can optionally filter by domain // Domain: "example.com", }, ) if err != nil { fmt.Println(err) } fmt.Println(automations.Data) } ``` -------------------------------- ### Start MCP Inspector Source: https://resend.com/docs/llms-full.txt Start the MCP Inspector tool. This is used for testing the Resend MCP setup and verifying server functionality. ```bash pnpm inspector ``` -------------------------------- ### Test the Application Source: https://resend.com/docs/dmarc-analyzer Start the development server to test the application using your preferred package manager. ```bash pnpm run dev ``` ```bash npm run dev ``` ```bash yarn run dev ``` -------------------------------- ### Get Automation Run Request Source: https://resend.com/docs/api-reference/automations/get-automation-run Example of how to call the API to get a specific automation run. Requires both the automation ID and the run ID. ```bash curl --request GET \ --url 'https://api.resend.com/automations/c7b16d4f-ba6c-4e2e-b044-6bf4404e57fd/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Java Example: Initialize Resend Client Source: https://resend.com/docs/dashboard/automations/add-to-segment Demonstrates how to import necessary Resend classes and initialize the Resend client in Java. ```java import com.resend.*; public class Main { public static void main(String[] args) { Resend resend = new Resend( ``` -------------------------------- ### Rust Quickstart Example Source: https://resend.com/docs/introduction This snippet shows how to send an email using Resend with Rust. Ensure you have the Resend Rust crate added to your Cargo.toml. ```rust use resend_rust::emails::SendEmailRequest; use resend_rust::ResendClient; #[tokio::main] async fn main() -> Result<(), Box> { let api_key = std::env::var("RESEND_API_KEY").expect("RESEND_API_KEY must be set"); let client = ResendClient::new(api_key); let email_request = SendEmailRequest { from: "Acme ".to_string(), to: vec!["delivered@resend.dev".to_string()], subject: "Hello world".to_string(), html: "Congratulations on sending your first email!".to_string(), ..Default::default() }; let response = client.emails.send(email_request).await?; println!("Email sent: {:?}", response); Ok(()) } ``` -------------------------------- ### Get Template by ID in Ruby Source: https://resend.com/docs/llms-full.txt This Ruby snippet shows how to get a template by its ID. Ensure the Resend gem is installed and the API key is set. ```ruby require "resend" Resend.api_key = "re_xxxxxxxxx" Resend::Templates.get("34a080c9-b17d-4187-ad80-5af20266e535") ``` -------------------------------- ### Create Automation - JavaScript Example Source: https://resend.com/docs/api-reference/automations/create-automation Example of creating an automation using the Resend JavaScript SDK. Ensure you have the SDK installed and initialized with your API key. ```javascript import { Resend } from 'resend'; const resend = new Resend('re_xxxxxxxxx'); async function createAutomation() { try { const automation = await resend.automations.create({ name: 'welcome', steps: [ { if: { condition: 'open_rate > 0.1', }, then: { action: 'send_email', email_id: 'cl_xxxxxxxxx', }, }, ], }); console.log(automation); } catch (error) { console.error(error); } } createAutomation(); ``` -------------------------------- ### Python SDK Example Source: https://resend.com/docs/dashboard/templates/version-history Demonstrates how to set up the Resend API key and create a template using the Python SDK. ```python import resend resend.api_key = "re_xxxxxxxxx" # Create template params: resend.Templates.CreateParams = { ``` -------------------------------- ### Copy Environment File Source: https://resend.com/docs/llms-full.txt Copy the example environment file to create your local configuration file. You will need to fill in the required values. ```bash cp .env.example .env.local ``` -------------------------------- ### Automation Structure Example Source: https://resend.com/docs/dashboard/automations/connections Illustrates the structure of an automation, including its name, trigger, and actions. This example shows a basic automation setup with a 'template' action. ```javascript Connections: [] resend.AutomationConnection({ From: "start" }) ``` -------------------------------- ### Create a Plan-based Welcome Automation (Go) Source: https://resend.com/docs/llms-full.txt Creates a plan-based welcome automation using the Resend Go SDK. Initializes the client with an API key and defines the automation request structure, including steps and connections. ```go package main import "github.com/resend/resend-go/v3" func main() { client := resend.NewClient("re_xxxxxxxxx") params := &resend.CreateAutomationRequest{ Name: "Plan-based Welcome", Steps: []resend.AutomationStep{ { Key: "start", Type: resend.AutomationStepTypeTrigger, Config: map[string]any{ "event_name": "user.created", }, }, { Key: "check_plan", Type: resend.AutomationStepTypeCondition, Config: map[string]any{ "type": "rule", "field": "event.plan", "operator": "eq", "value": "pro", }, }, { Key: "send_pro_email", Type: resend.AutomationStepTypeSendEmail, Config: map[string]any{ "template": map[string]any{"id": "pro-welcome-template-id"}, }, }, { Key: "send_free_email", Type: resend.AutomationStepTypeSendEmail, Config: map[string]any{ "template": map[string]any{"id": "free-welcome-template-id"}, }, }, }, Connections: []resend.AutomationConnection{ {From: "start", To: "check_plan", Type: resend.AutomationConnectionTypeDefault}, {From: "check_plan", To: "send_pro_email", Type: resend.AutomationConnectionTypeConditionMet}, {From: "check_plan", To: "send_free_email", Type: resend.AutomationConnectionTypeConditionNotMet}, }, } client.Automations.Create(params) } ``` -------------------------------- ### Get Contact Topics (Python) Source: https://resend.com/docs/api-reference/contacts/get-contact-topics Shows how to get contact topics using the Resend Python SDK. Install the SDK and set up your API key before running. ```python from resend import Resend resend = Resend("YOUR_API_KEY") try: topics = resend.contacts.get_topics(contact_id="contact_id_here") print(topics) except Exception as e: print(e) ``` -------------------------------- ### Start Development Server with npm Source: https://resend.com/docs/llms-full.txt Start the development server using npm. This allows you to run the application in a development environment. ```bash npm run dev ``` -------------------------------- ### Python SDK Example - Get Contact Topics by ID Source: https://resend.com/docs/api-reference/contacts/get-contact-topics Example of how to retrieve contact topics using the Resend Python SDK by providing a contact ID. ```python import resend resend.api_key = 're_xxxxxxxxx' # Get by contact id topics = resend.Contacts.Topics.list(contact_id='e169aa45-1ecf-4183-9955-b1499d5701d3') ``` -------------------------------- ### Get a domain claim Source: https://resend.com/docs/api-reference/domains/get-domain-claim This example demonstrates how to retrieve a domain claim by its ID. ```APIDOC ## GET /v1/domains/claims/{id} ### Description Retrieves the details of a specific domain claim. ### Method GET ### Endpoint /v1/domains/claims/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the domain claim to retrieve. ### Response #### Success Response (200) - **object** (string) - The type of the object, always "domain_claim". - **id** (string) - The unique identifier of the domain claim. - **name** (string) - The domain name associated with the claim. - **status** (string) - The current status of the domain claim (e.g., "pending", "verified"). - **domain_id** (string) - The ID of the domain associated with the claim. ### Response Example ```json { "object": "domain_claim", "id": "dacf4072-4119-4d88-932f-6c6126d3a9d1", "name": "example.com", "status": "pending", "domain_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Create Automation - Go Source: https://resend.com/docs/llms-full.txt Example of creating a welcome series automation using Go. Requires the Resend Go SDK. ```go package main import "github.com/resend/resend-go/v3" func main() { client := resend.NewClient("re_xxxxxxxxx") params := &resend.CreateAutomationRequest{ Name: "Welcome series", Status: resend.AutomationStatusDisabled, Steps: []resend.AutomationStep{ { Key: "start", Type: resend.AutomationStepTypeTrigger, Config: map[string]any{ "event_name": "user.created", }, }, { Key: "welcome", Type: resend.AutomationStepTypeSendEmail, Config: map[string]any{ "template": map[string]any{ "id": "34a080c9-b17d-4187-ad80-5af20266e535", }, }, }, }, Connections: []resend.AutomationConnection{ {From: "start", To: "welcome"}, }, } client.Automations.Create(params) } ``` -------------------------------- ### Rails Quickstart Example Source: https://resend.com/docs/introduction This snippet shows how to send an email using Resend within a Rails application. It assumes you have the Resend Rails gem configured. ```ruby class UserMailer < ApplicationMailer def welcome_email(user) @user = user mail(from: 'support@example.com', to: @user.email, subject: 'Welcome to Resend!') end end ``` -------------------------------- ### C#: Get Contact Topics Source: https://resend.com/docs/api-reference/contacts/get-contact-topics This C# example shows how to get contact topics using the Resend client. It demonstrates initializing the client and making the API call. ```csharp using Resend; var resend = ResendClient.Create("re_xxxxxxxxx"); // Or from DI var resp = await resend.ContactListTopicsAsync( ); // Or from DI ``` -------------------------------- ### Create Broadcasts in Go Source: https://resend.com/docs/llms-full.txt This Go example shows how to create broadcasts, either as drafts, to send immediately, or to schedule for a future time. Ensure the Resend client is initialized. ```Go package main import "github.com/resend/resend-go/v3" // Create a draft broadcast params := &resend.CreateBroadcastRequest{ SegmentId: "78261eea-8f8b-4381-83c6-79fa7120f1cf", From: "Acme ", Html: "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}", Subject: "Hello, world!", } broadcast, _ := client.Broadcasts.Create(params) // Create and send immediately params = { "segment_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "from": "Acme ", "subject": "Hello, world!", "html": "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}", "send": true, } broadcast, _ := client.Broadcasts.Create(params) // Create and schedule params = { "segment_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "from": "Acme ", "subject": "Hello, world!", "html": "Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}", "send": true, "scheduled_at": "in 1 hour", } broadcast, _ := client.Broadcasts.Create(params) ``` -------------------------------- ### Create Automation Step with 'start' Type Source: https://resend.com/docs/dashboard/automations/connections Example of creating a new automation step with the 'start' type and a 'trigger' configuration. This is typically used to initiate an automation flow. ```javascript _jsx(_components.span, { style: { color: "#6F42C1", "--shiki-dark": "#FFC799" }, children: "AutomationStepData" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: ">" }) }), "\n", _jsx(_components.span, { className: "line", children: _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " {" }) }), "\n", _jsxs(_components.span, { className: "line line-highlight", children: [_jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: " new" }), _jsx(_components.span, { style: { color: "#6F42C1", "--shiki-dark": "#FFC799" }, children: " AutomationStepData" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " { Ref " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#032F62", "--shiki-dark": "#99FFE4" }, children: " "start"" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: ", Type " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#032F62", "--shiki-dark": "#99FFE4" }, children: " "trigger"" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: ", Config " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " startConfig }," })], }), "\n", _jsxs(_components.span, { className: "line line-highlight", children: [_jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: " new" }), _jsx(_components.span, { style: { color: "#6F42C1", "--shiki-dark": "#FFC799" }, children: " AutomationStepData" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " { Ref " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#032F62", "--shiki-dark": "#99FFE4" }, children: " "welcome"" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: ", Type " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#032F62", "--shiki-dark": "#99FFE4" }, children: " "send_email"" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: ", Config " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " welcomeConfig }," })], }), "\n", _jsx(_components.span, { className: "line", children: _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " }," }) }), "\n", _jsxs(_components.span, { className: "line", children: [_jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: " Connections " }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: "=" }), _jsx(_components.span, { style: { color: "#D73A49", "--shiki-dark": "#A0A0A0" }, children: " new" }), _jsx(_components.span, { style: { color: "#6F42C1", "--shiki-dark": "#FFC799" }, children: " List" }), _jsx(_components.span, { style: { color: "#24292E", "--shiki-dark": "#FFF" }, children: "<" }), _jsx(_components.span, { style: { color: "#6F42C1", "--shiki-dark": "#FFC799" }, children: }) })] })] ``` -------------------------------- ### Install Dependencies (bun) Source: https://resend.com/docs/llms-full.txt Installs project dependencies after creating a React Email starter project using bun. Ensure you are in the project directory. ```bash cd react-email-starter bun install ``` -------------------------------- ### Local Development Setup for Resend MCP Source: https://resend.com/docs/mcp-server Clone the Resend MCP project, install dependencies using pnpm, and then run the project. This setup is for local development purposes. ```shell git clone https://github.com/resend/resend-mcp.git pnpm install pnpm run ``` -------------------------------- ### Install Resend Go SDK Source: https://resend.com/docs/llms-full.txt Installs the Resend Go SDK version 3 using the go get command. This is a prerequisite for integrating Resend functionality into your Go application. ```bash go get github.com/resend/resend-go/v3 ``` -------------------------------- ### Python SDK Example - Get Contact Topics by Email Source: https://resend.com/docs/api-reference/contacts/get-contact-topics Example of how to retrieve contact topics using the Resend Python SDK by providing a contact's email address. ```python import resend resend.api_key = 're_xxxxxxxxx' # Get by contact email topics = resend.Contacts.Topics.list(email='steve.wozniak@gmail.com') ``` -------------------------------- ### Initialize Resend Client in Go Source: https://resend.com/docs/api-reference/api-keys/delete-api-key Basic setup for using the Resend Go SDK. This snippet shows how to import the library and initialize the client. ```go package main import ( "resend" ) func main() { ``` -------------------------------- ### Node.js Request Example Source: https://resend.com/docs/api-reference/domains/list-domains This example shows how to make a request to list domains using the Resend Node.js SDK. It includes basic setup and demonstrates a typical API call. ```typescript "use strict"; const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; const {useMDXComponents: _provideComponents} = arguments[0]; const QueryParams = () => null; function _createMdxContent(props) { const _components = { a: "a", code: "code", p: "p", pre: "pre", span: "span", ..._provideComponents(), ...props.components }, {CodeBlock, Info, RequestExample, ResponseExample} = _components; if (!CodeBlock) _missingMdxReference("CodeBlock", true); if (!Info) _missingMdxReference("Info", true); if (!RequestExample) _missingMdxReference("RequestExample", true); if (!ResponseExample) _missingMdxReference("ResponseExample", true); return _jsxs(_Fragment, { children: [_jsx(Info, { children: _jsxs(_components.p, { children: ["See all available ", _jsx(_components.code, { children: "status" }), " types in ", _jsx(_components.a, { href: "/dashboard/domains/introduction#understand-a-domain-status", children: "the Domains\noverview" }), "."] }) }), "\n", _jsx(QueryParams, { type: "domains", isRequired: false }), "\n", _jsxs(RequestExample, { children: [_jsx(CodeBlock, { filename: "Node.js", numberOfLines: "5", language: "typescript", children: _jsx(_components.pre, { className: "shiki shiki-themes github-light vesper", style: { backgroundColor: "#fff", "--shiki-dark-bg": "#101010", color: "#24292e", "--shiki-dark": "#FFF" }, language: "typescript", children: _jsxs(_components.code, ```