Skip to main content
Glama

delete_campaign

Remove a campaign from the Keila newsletter system by specifying its ID. This action permanently deletes the campaign and its associated data.

Instructions

Delete a campaign.

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

Returns: Confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes

Implementation Reference

  • The MCP tool handler that receives the request and calls the underlying client method to delete a campaign.
    def delete_campaign(campaign_id: str) -> str:
        """
        Delete a campaign.
    
        Args:
            campaign_id: The campaign ID (e.g. "mc_12345").
    
        Returns:
            Confirmation message.
        """
        _client.delete_campaign(campaign_id)
        return f"Campaign {campaign_id} deleted."
  • The actual implementation of the deletion logic, making an HTTP DELETE request to the campaign API.
    def delete_campaign(self, campaign_id: str) -> None:
        """Delete a campaign."""
        resp = self.session.delete(f"{self.url}/api/v1/campaigns/{campaign_id}", headers=self._headers(), timeout=30)
        resp.raise_for_status()

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