get_email_accounts
Retrieve configured email accounts from Apollo.io for sending sequences and campaigns. Lists available accounts for sales and marketing outreach.
Instructions
Retrieve email accounts associated with your Apollo.io account.
This tool returns the list of configured email accounts for sending sequences and campaigns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/apollo_mcp_server.py:366-383 (handler)The handler function decorated with @mcp.tool() that implements the get_email_accounts tool by making a GET request to the Apollo.io /v1/email_accounts endpoint using the shared ApolloAPIClient.@mcp.tool() async def get_email_accounts() -> Dict[str, Any]: """ Retrieve email accounts associated with your Apollo.io account. This tool returns the list of configured email accounts for sending sequences and campaigns. """ endpoint = "/v1/email_accounts" try: result = await apollo_client.make_request("GET", endpoint) return result except httpx.HTTPStatusError as e: return {"error": f"API request failed: {e.response.status_code} {e.response.text}"} except Exception as e: return {"error": f"Request failed: {str(e)}"}
- src/apollo_mcp_server.py:50-72 (helper)The make_request method of ApolloAPIClient class, used by get_email_accounts to perform the API call.async def make_request( self, method: str, endpoint: str, params: Optional[Dict] = None, data: Optional[Dict] = None ) -> Dict[str, Any]: """Make an authenticated request to the Apollo.io API.""" url = f"{self.base_url}{endpoint}" async with httpx.AsyncClient() as client: if method.upper() == "GET": response = await client.get(url, headers=self.headers, params=params) elif method.upper() == "POST": response = await client.post(url, headers=self.headers, json=data) elif method.upper() == "PUT": response = await client.put(url, headers=self.headers, json=data) else: raise ValueError(f"Unsupported HTTP method: {method}") response.raise_for_status() return response.json()