Skip to main content
Glama

send_campaign

Send an email campaign immediately to all contacts or specific segments using the Keila newsletter API. Confirm campaign ID before sending to ensure correct delivery.

Instructions

Send a campaign immediately to all contacts (or segment contacts).

WARNING: This sends real emails. Make sure the campaign content and recipient list are correct before calling this.

Args: campaign_id: The campaign ID (e.g. "mc_12345").

Returns: Delivery queued confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes

Implementation Reference

  • MCP tool registration for send_campaign in mcp_server.py.
    @mcp.tool()
    def send_campaign(campaign_id: str) -> dict:
        """
        Send a campaign immediately to all contacts (or segment contacts).
    
        WARNING: This sends real emails. Make sure the campaign content and
        recipient list are correct before calling this.
    
        Args:
            campaign_id: The campaign ID (e.g. "mc_12345").
    
        Returns:
            Delivery queued confirmation.
        """
        return _client.send_campaign(campaign_id)
  • Actual implementation of send_campaign using the Keila API.
    def send_campaign(self, campaign_id: str) -> dict:
        """Send a campaign immediately."""
        resp = self.session.post(f"{self.url}/api/v1/campaigns/{campaign_id}/actions/send",
                                headers=self._headers(), timeout=30)
        resp.raise_for_status()
        return resp.json()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gwbischof/keila-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server