Home
MCP Integrations

ChatGPT / GPT

Connect Nitrosend to ChatGPT via MCP, custom GPT actions, or the OpenAI API

Connect Nitrosend to ChatGPT via Developer mode MCP for full access to all 21 tools, or use a custom GPT with API actions if you want a tailored wrapper.

ChatGPT Developer mode provides MCP client support for remote servers. This gives you direct access to all 21 Nitrosend tools without any local setup.

1. Enable Developer mode

In ChatGPT, go to SettingsAppsAdvanced settings and turn on Developer mode.

2. Create an app for Nitrosend

Open SettingsApps and click Create app in the Advanced section. Choose a remote MCP server and enter:

https://api.nitrosend.com/mcp

3. Sign in

ChatGPT will start the Nitrosend OAuth flow. Log in or create a free account — no API key needed.

4. Use the Nitrosend app in a conversation

Open a new chat, switch to Developer mode from the plus menu, and enable the Nitrosend app for that conversation. Then ask:

Ask ChatGPT anything about your email marketing:

What's my Nitrosend account status?
Create a welcome email flow for new subscribers
Info

No API key or local dependencies required. Authentication is handled via OAuth sign-in when you first connect.


Option 2: Custom GPT with Actions

Create a custom GPT in ChatGPT that can manage your email marketing.

1. Get your API key

Go to Settings > API Keys in the Nitrosend dashboard and copy your key.

2. Create a custom GPT

Go to ChatGPTExplore GPTsCreate a GPT.

3. Add the Nitrosend action

In the GPT editor, go to ConfigureActionsCreate new action.

Set the Authentication to:

  • Type: API Key
  • Auth Type: Bearer
  • Key: your nskey_live_... key

Import the OpenAPI schema from:

https://api.nitrosend.com/openapi.yaml

This automatically imports all available Nitrosend endpoints as GPT actions.

4. Add instructions

In the GPT's Instructions field, add context about your use case:

You are an email marketing assistant connected to Nitrosend.
You can create campaigns, manage contacts, build automation flows,
and check analytics. Always confirm before sending campaigns.
Ask for a preview or test send before going live.

5. Save and use

Save your GPT. You can now ask it things like:

  • "Create an email campaign about our summer sale"
  • "How many subscribers do I have?"
  • "Show me the performance of my last campaign"

Option 3: OpenAI API with tool calling

For programmatic integration, call the Nitrosend REST API from your own OpenAI-powered app.

Define your tools

from openai import OpenAI

client = OpenAI()

tools = [
    {
        "type": "function",
        "function": {
            "name": "send_email",
            "description": "Send a transactional email to a single recipient",
            "parameters": {
                "type": "object",
                "properties": {
                    "to": {"type": "string", "description": "Recipient email address"},
                    "subject": {"type": "string", "description": "Email subject line"},
                    "body": {"type": "string", "description": "Email body (HTML or plain text)"}
                },
                "required": ["to", "subject", "body"]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "list_campaigns",
            "description": "List all email campaigns",
            "parameters": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": ["draft", "active", "paused", "completed"],
                        "description": "Filter by campaign status"
                    }
                }
            }
        }
    }
]

response = client.responses.create(
    model="gpt-5",
    input="Send a transactional email to jane@example.com welcoming her to the newsletter.",
    tools=tools
)

Handle function calls

When your app receives a function call, execute the corresponding Nitrosend API request:

import requests

NITROSEND_API_KEY = "nskey_live_your_key_here"
BASE_URL = "https://api.nitrosend.com/v1/my"
HEADERS = {
    "Authorization": f"Bearer {NITROSEND_API_KEY}",
    "Content-Type": "application/json"
}

def handle_function_call(name, arguments):
    if name == "send_email":
        response = requests.post(
            f"{BASE_URL}/messages",
            headers=HEADERS,
            json={
                "channel": "email",
                "to": arguments["to"],
                "subject": arguments["subject"],
                "body": arguments["body"]
            }
        )
        return response.json()

    elif name == "list_campaigns":
        params = {}
        if "status" in arguments:
            params["status"] = arguments["status"]
        response = requests.get(
            f"{BASE_URL}/campaigns",
            headers=HEADERS,
            params=params
        )
        return response.json()

Key API endpoints

These are the most useful endpoints for GPT integrations:

ActionMethodEndpoint
Send a messagePOST/v1/my/messages
List campaignsGET/v1/my/campaigns
Create a campaignPOST/v1/my/campaigns
List contactsGET/v1/my/contacts
Import contactsPOST/v1/my/imports
Poll import statusGET/v1/my/imports/{id}
List templatesGET/v1/my/templates
Get account infoGET/v1/my/account

See the full API Reference for all available endpoints.

Info

The OpenAPI spec at https://api.nitrosend.com/openapi.yaml is always up to date and can be imported directly into any tool that supports OpenAPI 3.1.