### Example Workflow: Brand Setup and Welcome Email Source: https://docs.nitrosend.com/integrations/vscode Use this prompt in Copilot chat to set up your Brand Kit from a given URL and draft a welcome email for new subscribers. ```plaintext Set up my Brand Kit from https://mysite.com and draft a welcome email for new subscribers. ``` -------------------------------- ### Describe a command with JSON output Source: https://docs.nitrosend.com/cli/agent-mode Use `describe` to get command metadata like schemas, examples, and safety class. Caching the schema at startup is recommended for agent harnesses. ```bash nitrosend describe mcp tools call --json ``` -------------------------------- ### Read Platform Guide (TypeScript) Source: https://docs.nitrosend.com/mcp Use this TypeScript code to read the platform guide. Ensure you have the client initialized. ```typescript const result = await client.readResource("nitro://guide"); ``` -------------------------------- ### Read Platform Guide (Python) Source: https://docs.nitrosend.com/mcp Use this Python code to read the platform guide. This is part of the session object. ```python result = await session.read_resource("nitro://guide") ``` -------------------------------- ### API Reference Examples Source: https://docs.nitrosend.com/integrations/api-reference Browse every endpoint, parameter, and response schema with copy-paste examples in curl, JavaScript, and Python. ```curl curl -X GET \ 'https://api.nitrosend.com/v1/my/plan' \ -H 'Authorization: Bearer nskey_live_...' ``` ```javascript fetch('https://api.nitrosend.com/v1/my/plan', { method: 'GET', headers: { 'Authorization': 'Bearer nskey_live_...' } }) .then(response => response.json()) .then(data => console.log(data)); ``` ```python import requests headers = { 'Authorization': 'Bearer nskey_live_...' } response = requests.get('https://api.nitrosend.com/v1/my/plan', headers=headers) print(response.json()) ``` -------------------------------- ### Read Platform Guide (JSON-RPC) Source: https://docs.nitrosend.com/mcp Use this JSON-RPC request to read the platform guide. The guide provides essential information about Nitrosend vocabulary and operating modes. ```json { "jsonrpc": "2.0", "method": "resources/read", "params": { "uri": "nitro://guide" } } ``` -------------------------------- ### Example API Request Source: https://docs.nitrosend.com/authentication Example of how to make an authenticated API request using curl. ```curl curl https://api.nitrosend.com/v1/my/account \ -H "Authorization: Bearer nskey_live_..." ``` -------------------------------- ### Install Dependencies Source: https://docs.nitrosend.com/integrations/vercel-ai-sdk Install the necessary packages for Vercel AI SDK integration with Nitrosend, including the AI SDK and a model package like OpenAI. ```bash npm install @nitrosend/ai-sdk ai @ai-sdk/mcp zod npm install @ai-sdk/openai ``` -------------------------------- ### Audit Email Setup in Cowork Source: https://docs.nitrosend.com/integrations/claude-cowork Example prompt to audit your Nitrosend account setup, including Brand Kit, domain health, and active flows, within Claude Cowork. ```text Review my Nitrosend account setup. Check my Brand Kit, sending domain health, and active flows. Are there any improvements you'd recommend? ``` -------------------------------- ### Read Platform Guide Source: https://docs.nitrosend.com/mcp Retrieves the platform guide, which contains essential information about Nitrosend vocabulary, operating modes, and best practices. ```APIDOC ## Read Platform Guide ### Description Retrieves the platform guide, which contains essential information about Nitrosend vocabulary, operating modes, and best practices. This guide is crucial for understanding the platform before performing any actions. ### Method JSON-RPC ### Endpoint resources/read ### Parameters #### Query Parameters - **uri** (string) - Required - The URI for the platform guide: "nitro://guide" ### Request Example ```json { "jsonrpc": "2.0", "method": "resources/read", "params": { "uri": "nitro://guide" } } ``` ### Response #### Success Response - **content** (array) - Contains MCP content elements (text, image, or embedded resource). - **type** (string) - The type of content (e.g., "text"). - **text** (string) - The actual text content of the guide. #### Response Example ```json { "content": [ { "type": "text", "text": "..." } ] } ``` ``` -------------------------------- ### Install Nitrosend AI SDK Source: https://docs.nitrosend.com/integrations/vercel-marketplace Install the necessary packages for the Nitrosend AI SDK. This includes the AI SDK itself, the MCP client, and Zod for validation. ```bash npm install @nitrosend/ai-sdk ai @ai-sdk/mcp zod ``` -------------------------------- ### Install Nitrosend CLI with npm Source: https://docs.nitrosend.com/cli/install Install the Nitrosend CLI globally using npm. Requires Node.js 18 or newer. ```bash npm install -g @nitrosend/cli ``` -------------------------------- ### Install Nitrosend CLI with pnpm Source: https://docs.nitrosend.com/cli/install Install the Nitrosend CLI globally using pnpm. Requires Node.js 18 or newer. ```bash pnpm add -g @nitrosend/cli ``` -------------------------------- ### Example Workflow: Performance Check Source: https://docs.nitrosend.com/integrations/vscode Request insights for your most recent email campaign directly within Copilot chat. ```plaintext Show me insights for my most recent campaign. ``` -------------------------------- ### Python Example for nitro_define_segment Source: https://docs.nitrosend.com/mcp Example of how to use the nitro_define_segment tool in Python. This demonstrates calling the tool with segment definition arguments. ```python result = await session.call_tool("nitro_define_segment", arguments={ "name": "string", "filters": [ { "name": "string", "predicate": "eq" } ], "segment_id": 0, "preview_only": true, "idempotency_key": "string" }) ``` -------------------------------- ### Get Prompt Source: https://docs.nitrosend.com/mcp Renders a prompt template by its name, returning structured workflow instructions for AI-guided tasks. ```APIDOC ## Get Prompt ### Description Renders a prompt template by its name, returning structured workflow instructions for AI-guided tasks. Each prompt includes context requirements, step sequence, and expected tool calls. ### Method GET ### Endpoint `/websites/nitrosend/prompts/{name}` ### Parameters #### Path Parameters - **name** (string) - Required - The name of the prompt template. ### Response #### Success Response (200) - **content** (array) - An array of content blocks, where each block can be of type 'text', 'image', or 'embedded resource'. ### Request Example (JSON-RPC) ```json { "jsonrpc": "2.0", "method": "resources/read", "params": { "uri": "nitro://prompts/{name}" } } ``` ### Request Example (TypeScript SDK) ```typescript const result = await client.readResource("nitro://prompts/{name}"); ``` ### Request Example (Python SDK) ```python result = await session.read_resource("nitro://prompts/{name}") ``` ### Response Example ```json { "content": [ { "type": "text", "text": "..." } ] } ``` ``` -------------------------------- ### Read Flow Resource using Python Source: https://docs.nitrosend.com/mcp Use this Python code to read the example flow resource. The session object must be available. ```python result = await session.read_resource("nitro://examples/flow") ``` -------------------------------- ### Read Email Resource using Python Source: https://docs.nitrosend.com/mcp Use this Python code to read the example email resource. The session object must be available. ```python result = await session.read_resource("nitro://examples/email") ``` -------------------------------- ### Production Environment Configuration Source: https://docs.nitrosend.com/cli/project-config Example of a .nitrosend.yml file configured for a production environment, enabling stricter confirmation guards for destructive commands. ```yaml # .nitrosend.yml in your prod automation repo profile: prod environment: production output: json ``` -------------------------------- ### Read Flow Resource using TypeScript Source: https://docs.nitrosend.com/mcp Use this TypeScript code to read the example flow resource. Ensure the client is properly initialized. ```typescript const result = await client.readResource("nitro://examples/flow"); ``` -------------------------------- ### Read Email Resource using TypeScript Source: https://docs.nitrosend.com/mcp Use this TypeScript code to read the example email resource. Ensure the client is properly initialized. ```typescript const result = await client.readResource("nitro://examples/email"); ``` -------------------------------- ### Python Client Call for nitro_compose_campaign Source: https://docs.nitrosend.com/mcp Example of how to invoke the nitro_compose_campaign tool using a Python client. The 'arguments' parameter should be a dictionary matching the expected schema. ```python result = await session.call_tool("nitro_compose_campaign", arguments={ "name": "string", "mode": "create", "campaign_id": 0, "channel": "email", "goal": "string", "composition_mode": "intent", "contract_id": "string", "validate_only": false, "design_mode_override": "premium_rich", "renegotiate": false, "user_instruction": "string", "draft_meta": { "creative_route_id": "string", "concrete_anchor": "string", "why_this_earns_the_inbox": "string" }, "subject": "string", "preheader": "string", "from_name": "string", "from_email": "string", "reply_to": "string", "body": "string", "sections": [ {} ], "theme": {}, "template_id": 0, "if_version": 0, "audience": { "audience_type": "lists", "contact_list_ids": [ 0 ], "contact_list_id": 0, "segment_id": 0 }, "scheduled_at": "2024-01-15T09:30:00Z", "dry_run": false, "idempotency_key": "string", "confirm": false }) ``` -------------------------------- ### Example AI Memory Content Source: https://docs.nitrosend.com/integrations/mcp-brand-kit-memory Populate AI Memory with details about brand voice, target audience, email strategy, current goals, and what to avoid. ```markdown ## Brand Voice We're friendly but professional. We write in second person ("you") and keep sentences short. No corporate jargon. We use humor sparingly but effectively. ## Target Audience Small business owners and indie creators who are tech-savvy but time-poor. They value efficiency and straight talk over flashy design. ## Email Strategy - Weekly newsletter every Tuesday at 10am EST - Welcome series: 5 emails over 2 weeks - Re-engagement flow for contacts inactive 30+ days - Always include one clear CTA per email ## Current Goals - Grow newsletter to 5,000 subscribers by Q2 2026 - Improve open rate from 35% to 45% - Launch product announcement campaign in April ## What NOT to do - Never use clickbait subject lines - Don't send more than 3 emails per week to any contact - Avoid discount-heavy messaging — we compete on value, not price ``` -------------------------------- ### TypeScript Client Call for nitro_compose_campaign Source: https://docs.nitrosend.com/mcp Example of how to call the nitro_compose_campaign tool using a TypeScript client. Ensure the client is properly initialized before making the call. ```typescript const result = await client.callTool("nitro_compose_campaign", { "name": "string", "mode": "create", "campaign_id": 0, "channel": "email", "goal": "string", "composition_mode": "intent", "contract_id": "string", "validate_only": false, "design_mode_override": "premium_rich", "renegotiate": false, "user_instruction": "string", "draft_meta": { "creative_route_id": "string", "concrete_anchor": "string", "why_this_earns_the_inbox": "string" }, "subject": "string", "preheader": "string", "from_name": "string", "from_email": "string", "reply_to": "string", "body": "string", "sections": [ {} ], "theme": {}, "template_id": 0, "if_version": 0, "audience": { "audience_type": "lists", "contact_list_ids": [ 0 ], "contact_list_id": 0, "segment_id": 0 }, "scheduled_at": "2024-01-15T09:30:00Z", "dry_run": false, "idempotency_key": "string", "confirm": false }); ``` -------------------------------- ### Python Client Call for nitro_compose_flow Source: https://docs.nitrosend.com/mcp Demonstrates how to invoke the nitro_compose_flow tool using a Python client. This example assumes a session object is already established. ```python result = await session.call_tool("nitro_compose_flow", arguments={ "name": "string", "mode": "create", "flow_id": 0, "goal": "string", "composition_mode": "intent", "contract_id": "string", "validate_only": false, "design_mode_override": "premium_rich", "renegotiate": false, "user_instruction": "string", "draft_meta": { "creative_route_id": "string", "concrete_anchor": "string", "why_this_earns_the_inbox": "string" }, "trigger": { "event": "string", "segment_id": 0, "contact_list_id": 0, "data": {} }, "steps": [ { "type": "email", "subject": "string", "body": "string", "preheader": "string", "from_name": "string", "from_email": "string", "reply_to": "string", "design": {}, "if_version": 0, "template_version": 0, "bcc": "string", "duration": 0, "event_name": "string", "event_data": {}, "forward_event_data": false, "url": "string", "method": "POST", "headers": {}, "filters": [ { "name": "string", "predicate": "eq" } ], "yes": [ {} ], "no": [ {} ], "channel": "phone" } ], "dry_run": false, "idempotency_key": "string", "confirm": false }) ``` -------------------------------- ### Setup Lifecycle Automation with lifecycle-setup Prompt Source: https://docs.nitrosend.com/mcp Use the 'lifecycle-setup' prompt to review a brand site and draft key lifecycle automation flows. Requires website URL and a test recipient email. ```JSON-RPC { "jsonrpc": "2.0", "method": "prompts/get", "params": { "name": "lifecycle-setup", "arguments": { "website_url": "", "test_recipient": "" } } } ``` ```TypeScript const result = await client.getPrompt("lifecycle-setup", { website_url: "", test_recipient: "", }); ``` ```Python result = await session.get_prompt("lifecycle-setup", arguments={ "website_url": "", "test_recipient": "", }) ``` -------------------------------- ### lifecycle-setup Source: https://docs.nitrosend.com/mcp Review a brand site and draft key lifecycle automation flows. Requires the website URL and a test recipient email address. Returns MCP content array. ```APIDOC ## lifecycle-setup ### Description Review a brand site and draft the key lifecycle automation flows. ### Parameters - `website_url` (string) - Required - Brand website to review and scrape, e.g. https://example.com - `test_recipient` (string) - Required - Email address that should receive flow test messages ### Returns Returns MCP content array (text, image, or embedded resource). ### JSON-RPC Request ```json { "jsonrpc": "2.0", "method": "prompts/get", "params": { "name": "lifecycle-setup", "arguments": { "website_url": "", "test_recipient": "" } } } ``` ### TypeScript Request ```typescript const result = await client.getPrompt("lifecycle-setup", { website_url: "", test_recipient: "", }); ``` ### Python Request ```python result = await session.get_prompt("lifecycle-setup", arguments={ "website_url": "", "test_recipient": "", }) ``` ### Response Example ```json { "content": [ { "type": "text", "text": "..." } ] } ``` ``` -------------------------------- ### nitro_get_status Response Example Source: https://docs.nitrosend.com/mcp Example response structure for the nitro_get_status tool. ```json { "content": [ { "type": "text", "text": "..." } ] } ``` -------------------------------- ### Build a Welcome Email Flow Source: https://docs.nitrosend.com/integrations/windsurf An example prompt for Windsurf to create an automated email flow. This flow includes sending a welcome email upon contact addition, followed by a follow-up email after a delay. ```bash Create a welcome flow: when a contact is added, send a welcome email, wait 3 days, then send a follow-up. ``` -------------------------------- ### Confirm Nitrosend CLI Installation Source: https://docs.nitrosend.com/cli/install Verify that the Nitrosend CLI has been installed correctly by checking its version. ```bash nitrosend --version ``` -------------------------------- ### Initial CLI Workflow Commands Source: https://docs.nitrosend.com/cli/overview Run these commands to confirm the CLI is set up and connected to your account. `nitrosend login` initiates OAuth, `whoami` displays the active profile, and a bare `nitrosend` command opens the dashboard. ```bash nitrosend login nitrosend whoami nitrosend ``` -------------------------------- ### Plan then Act with `--explain` Source: https://docs.nitrosend.com/cli/recipes Use `--explain` to generate a deterministic plan for a campaign composition before execution. The plan has the same structure as a real run but with `would_execute: false`. This allows inspection and decision-making before committing to the action. ```bash plan=$(nitrosend mcp tools call nitro_compose_campaign \ --args "$(cat brief.json)" --explain --machine) # Inspect the plan, decide, then run for real echo "$plan" | jq '.data' if [ "$(echo "$plan" | jq -r '.data.would_execute')" = "false" ]; then nitrosend mcp tools call nitro_compose_campaign \ --args "$(cat brief.json)" --machine fi ``` -------------------------------- ### nitro_manage_billing Request Body Example Source: https://docs.nitrosend.com/mcp Example of the request body structure for the nitro_manage_billing tool, specifying the 'status' operation. ```json { "operation": "status", "params": { "plan_id": 0 } } ``` -------------------------------- ### Example Workflow: Campaign Creation Source: https://docs.nitrosend.com/integrations/vscode Create a new email campaign with a specified name, target list, text content, and a call-to-action button linking to a blog post. ```plaintext Create a campaign called "Weekly Update" for my newsletter list with a text section and a CTA button linking to our blog. ``` -------------------------------- ### Explain command with JSON output Source: https://docs.nitrosend.com/cli/agent-mode Use the `--explain` flag to get a resolved plan as data. This is available on every command and can be used from an agent harness to fetch a deterministic plan before execution. The `--json` flag ensures the output is in JSON format. ```bash nitrosend mcp tools call nitro_compose_campaign --args '{...}' --explain --json ``` -------------------------------- ### TypeScript Example for nitro_define_segment Source: https://docs.nitrosend.com/mcp Example of how to use the nitro_define_segment tool in TypeScript. This demonstrates calling the tool with segment definition arguments. ```typescript const result = await client.callTool("nitro_define_segment", { "name": "string", "filters": [ { "name": "string", "predicate": "eq" } ], "segment_id": 0, "preview_only": true, "idempotency_key": "string" }); ``` -------------------------------- ### Draft Welcome Email with Brand Kit Source: https://docs.nitrosend.com/integrations/zed Use this prompt in Zed's AI assistant to set up your brand kit from a given URL and draft a welcome email. This showcases Nitrosend's content generation capabilities. ```text Set up my Brand Kit from https://mysite.com and draft a welcome email. ``` -------------------------------- ### Install Nitrosend CLI with yarn Source: https://docs.nitrosend.com/cli/install Install the Nitrosend CLI globally using yarn. Requires Node.js 18 or newer. ```bash yarn global add @nitrosend/cli ``` -------------------------------- ### Onboard Brand Kit Python Client Source: https://docs.nitrosend.com/mcp Use the session.get_prompt method in Python to fetch the 'onboard-brand-kit' prompt. This demonstrates server-side or Python client interaction. ```python result = await session.get_prompt("onboard-brand-kit") ``` -------------------------------- ### Tab Completion Setup Source: https://docs.nitrosend.com/cli/recipes Provides commands to set up tab completion for NitroSend CLI in bash, zsh, and fish shells. This enhances usability by offering command and argument suggestions. ```bash # bash nitrosend completion bash >> ~/.bashrc # zsh nitrosend completion zsh > ~/.config/zsh/completions/_nitrosend # fish nitrosend completion fish > ~/.config/fish/completions/nitrosend.fish ``` -------------------------------- ### List MCP Tools Source: https://docs.nitrosend.com/cli/install Confirm reachability to the platform surface by listing available MCP tools. ```bash nitrosend mcp tools list ``` -------------------------------- ### Get Account Status using cURL Source: https://docs.nitrosend.com/integrations/rest-api Fetch the current status of your Nitrosend account. This is a simple GET request requiring only authentication. ```bash curl https://api.nitrosend.com/v1/my/account \ -H "Authorization: Bearer $NITROSEND_API_KEY" ``` -------------------------------- ### Quickstart: generateText with Nitrosend Tools Source: https://docs.nitrosend.com/integrations/vercel-ai-sdk Use `generateText` with `withNitrosendTools` to draft content using Nitrosend tools. Ensure `stopWhen: isStepCount(N)` is set for tool-calling workflows. ```typescript import { generateText, isStepCount } from 'ai'; import { openai } from '@ai-sdk/openai'; import { withNitrosendTools } from '@nitrosend/ai-sdk'; const result = await withNitrosendTools({}, async ({ tools }) => { return generateText({ model: openai('gpt-4o'), tools, stopWhen: isStepCount(5), prompt: 'Draft a welcome campaign for the Newsletter list.', }); }); ``` -------------------------------- ### Quick Status Snapshot Source: https://docs.nitrosend.com/cli/recipes Provides a quick overview of account state, blockers, and the next action. It also shows how to read specific account resources and get insights. ```bash nitrosend # account state, blockers, next_action nitrosend mcp resources read nitro://account nitrosend mcp tools call nitro_get_insights --args '{"scope":"account"}' ``` -------------------------------- ### AI Prompt for Email Series Source: https://docs.nitrosend.com/ Example of an AI prompt to create a welcome email series. This demonstrates how users can interact with AI tools to generate marketing content. ```natural language You: "Create a 5-email welcome series for new subscribers" Claude: Done. I've built the flow with a welcome email, a 3-day follow-up, a product highlight on day 7, a case study on day 10, and a special offer on day 14. Want me to send a test? ``` -------------------------------- ### Check Campaign Performance Metrics Source: https://docs.nitrosend.com/integrations/windsurf An example prompt for Windsurf to retrieve performance metrics for a recent campaign. This includes checking open rates and click rates. ```bash Show me open rates and click rates for my last campaign. ``` -------------------------------- ### nitro_import_contacts TypeScript Example Source: https://docs.nitrosend.com/mcp This TypeScript example demonstrates calling the nitro_import_contacts tool with various arguments, including contact records, upload details, and import options. ```TypeScript const result = await client.callTool("nitro_import_contacts", { "records": [ { "email": "string", "phone": "string", "first_name": "string", "last_name": "string", "country_code": "string", "source": "string", "opt_in": true } ], "import_id": 0, "signed_id": "string", "upload": { "filename": "string", "content_type": "string", "byte_size": 0, "checksum": "string" }, "resource": "contacts", "parser": "default", "columns": {}, "options": { "list_ids": [ 0 ] }, "dry_run": false, "idempotency_key": "string" }); ``` -------------------------------- ### Get campaign Source: https://docs.nitrosend.com/integrations/rest-api Retrieves a specific campaign by its ID. ```APIDOC ## GET /campaigns/{id} ### Description Gets a specific campaign by its ID. ### Method GET ### Endpoint /campaigns/{id} ``` -------------------------------- ### Get template Source: https://docs.nitrosend.com/integrations/rest-api Retrieves a specific email template by its ID. ```APIDOC ## GET /templates/{id} ### Description Gets a specific email template by its ID. ### Method GET ### Endpoint /templates/{id} ``` -------------------------------- ### Build Marketing Email Prompt Source: https://docs.nitrosend.com/mcp Use this prompt to compose a marketing email. Requires a 'goal' argument describing the purpose of the email. ```JSON-RPC { "jsonrpc": "2.0", "method": "prompts/get", "params": { "name": "build-email", "arguments": { "goal": "" } } } ``` ```TypeScript const result = await client.getPrompt("build-email", { goal: "", }); ``` ```Python result = await session.get_prompt("build-email", arguments={ "goal": "", }) ``` -------------------------------- ### Get account info Source: https://docs.nitrosend.com/integrations/chatgpt Fetches information about the current account. ```APIDOC ## GET /v1/my/account ### Description Retrieves account information. ### Method GET ### Endpoint /v1/my/account ``` -------------------------------- ### Get account status Source: https://docs.nitrosend.com/integrations/rest-api Retrieve the current status and information about the Nitrosend account. ```APIDOC ## GET /v1/my/account ### Description Retrieve the current status and information about the Nitrosend account. ### Method GET ### Endpoint /v1/my/account ### Parameters (No parameters specified in source) ### Request Example (No request body specified in source) ### Response #### Success Response (200) (Response details not provided in source) #### Response Example (Response example not provided in source) ``` -------------------------------- ### Compose Launch Announcement Email with Brand Kit Source: https://docs.nitrosend.com/integrations/windsurf An example prompt for Windsurf to scrape a Brand Kit from a given URL and compose a launch announcement email. This demonstrates a combined workflow. ```bash Scrape my Brand Kit from https://mysite.com and compose a launch announcement email. ``` -------------------------------- ### nitro_get_insights Source: https://docs.nitrosend.com/mcp Get email analytics with trends, benchmarks, and recommendations. Supports filtering by scope and time period. ```APIDOC ## nitro_get_insights ### Description Get email analytics with trends, benchmarks, and recommendations. ### Parameters #### Path Parameters - `scope` (string) - Required - Scope of insights: account-wide, per flow, per campaign, or per message - `entity_id` (integer) - Optional - Required for flow/campaign/message scope - `period` (string) - Optional - Time period for metrics (default 30d). Options: 7d, 30d, 90d. ### Response #### Success Response (200) - `content` (array) - MCP content array (text, image, or embedded resource). ### Request Example (JSON-RPC) ```json { "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "nitro_get_insights", "arguments": { "scope": "account", "entity_id": 1, "period": "30d" } } } ``` ### Request Example (TypeScript) ```typescript const result = await client.callTool("nitro_get_insights", { "scope": "account", "entity_id": 1, "period": "30d" }); ``` ### Request Example (Python) ```python result = await session.call_tool("nitro_get_insights", arguments={ "scope": "account", "entity_id": 1, "period": "30d" }) ``` ### Response Example ```json { "content": [ { "type": "text", "text": "..." } ] } ``` ``` -------------------------------- ### Call nitro_request_support using TypeScript Source: https://docs.nitrosend.com/mcp Example of how to invoke the nitro_request_support tool with TypeScript. The subject and message parameters are required. ```typescript const result = await client.callTool("nitro_request_support", { "subject": "string", "message": "string" }); ``` -------------------------------- ### Send Email and List Campaigns with JavaScript (Node.js) Source: https://docs.nitrosend.com/integrations/rest-api Utilize the `fetch` API in Node.js to send emails and list campaigns. This example uses `async/await` for asynchronous operations. ```JavaScript const API_KEY = "nskey_live_your_key_here"; const BASE_URL = "https://api.nitrosend.com/v1/my"; const headers = { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }; // Send an email const response = await fetch(`${BASE_URL}/messages`, { method: "POST", headers, body: JSON.stringify({ channel: "email", to: "user@example.com", subject: "Hello from Node.js", body: "

Hi!

", }), }); console.log(await response.json()); // List campaigns const campaigns = await fetch(`${BASE_URL}/campaigns`, { headers }); console.log(await campaigns.json()); ``` -------------------------------- ### Get an MCP Prompt Source: https://docs.nitrosend.com/cli/reference Retrieve an MCP prompt with JSON-encoded arguments. This is used for interacting with prompt-based MCP functionalities. ```bash nitrosend mcp prompts get --args '{...}' ``` -------------------------------- ### nitro_send_test_message Python Client Call Source: https://docs.nitrosend.com/mcp Example of how to call the nitro_send_test_message tool using a Python client. The arguments are passed as a dictionary. ```python result = await session.call_tool("nitro_send_test_message", arguments={ "target_type": "template", "target_id": 1, "latest_campaign": false, "template_id": 1, "action_id": 1, "channel": "auto", "contact_id": 1, "to": [ "string" ], "dry_run": false, "idempotency_key": "string" }) ``` -------------------------------- ### nitro_manage_audience Python Session Call Source: https://docs.nitrosend.com/mcp Example of calling the nitro_manage_audience tool within a Python session. The arguments are passed as a dictionary. ```python result = await session.call_tool("nitro_manage_audience", arguments={ "operation": "create_contact", "params": {}, "dry_run": false, "confirm": false, "idempotency_key": "string" }) ``` -------------------------------- ### AI Prompt for Full Setup Source: https://docs.nitrosend.com/ A comprehensive AI prompt to set up Nitrosend, including brand integration, email flow suggestions, and design guidance. This showcases the platform's ability to automate complex tasks. ```natural language Connect into Nitrosend and based on my brand, give me a suggested email flow to set up and guide me through set up. Make the email design modern and on brand against my website. ``` -------------------------------- ### nitro_manage_audience JSON-RPC Call Source: https://docs.nitrosend.com/mcp Example of calling the nitro_manage_audience tool using JSON-RPC. This structure is used for backend or cross-service communication. ```json { "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "nitro_manage_audience", "arguments": { "operation": "create_contact", "params": {}, "dry_run": false, "confirm": false, "idempotency_key": "string" } } } ``` -------------------------------- ### Review Existing Flow with flow-review Prompt Source: https://docs.nitrosend.com/mcp Use the 'flow-review' prompt to review an existing flow. Provide the flow ID as an argument. This prompt returns MCP content. ```JSON-RPC { "jsonrpc": "2.0", "method": "prompts/get", "params": { "name": "flow-review", "arguments": { "flow_id": "" } } } ``` ```TypeScript const result = await client.getPrompt("flow-review", { flow_id: "", }); ``` ```Python result = await session.get_prompt("flow-review", arguments={ "flow_id": "", }) ``` -------------------------------- ### Call nitro_select_brand in Python Source: https://docs.nitrosend.com/mcp Example of how to invoke the nitro_select_brand tool using the session object in Python. Arguments can be passed as a dictionary. ```python result = await session.call_tool("nitro_select_brand", arguments={ "brand_sid": "string", "name": "string" }) ``` -------------------------------- ### Plan and Execute a Campaign in Cowork Source: https://docs.nitrosend.com/integrations/claude-cowork Example prompt for planning and executing a newsletter campaign within Claude Cowork, leveraging Nitrosend's capabilities. ```text Let's plan our March newsletter. Check my recent campaign performance, then create a new campaign targeting subscribers who opened the last email. Include a section about our new features. ``` -------------------------------- ### Call nitro_select_brand in TypeScript Source: https://docs.nitrosend.com/mcp Example of how to call the nitro_select_brand tool using the client in TypeScript. Ensure the client is properly initialized. ```typescript const result = await client.callTool("nitro_select_brand", { "brand_sid": "string", "name": "string" }); ``` -------------------------------- ### onboard-brand-kit Source: https://docs.nitrosend.com/mcp Sets up Brand Kit identity for a new brand. This prompt returns MCP content, which can be text, an image, or an embedded resource. ```APIDOC ## onboard-brand-kit ### Description Sets up Brand Kit identity for a new brand. Returns MCP content array (text, image, or embedded resource). ### Method JSON-RPC ### Endpoint prompts/get ### Parameters #### Request Body - **name** (string) - Required - The name of the prompt to execute, in this case "onboard-brand-kit". - **arguments** (object) - Optional - An object containing any arguments required by the prompt. For "onboard-brand-kit", this is an empty object. ### Request Example ```json { "jsonrpc": "2.0", "method": "prompts/get", "params": { "name": "onboard-brand-kit", "arguments": {} } } ``` ### Response #### Success Response - **content** (array) - An array containing MCP content elements. - **type** (string) - The type of content (e.g., "text", "image"). - **text** (string) - The text content, if type is "text". ### Response Example ```json { "content": [ { "type": "text", "text": "..." } ] } ``` ``` -------------------------------- ### Example Error Response Structure Source: https://docs.nitrosend.com/integrations/rest-api This JSON structure represents a typical error response from the API, indicating validation issues. ```json { "error": true, "code": "validation_error", "message": "Email is required", "validation_errors": { "email": ["can't be blank"] } } ```