# egoisdk.EmailApi All URIs are relative to *https://api.egoiapp.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**actionEnableEmailRss**](EmailApi.md#actionEnableEmailRss) | **POST** /campaigns/email/rss/{campaign_hash}/actions/enable | Enables a rss email campaign [**actionSendEmail**](EmailApi.md#actionSendEmail) | **POST** /campaigns/email/{campaign_hash}/actions/send | Send email message [**createEmailCampaign**](EmailApi.md#createEmailCampaign) | **POST** /campaigns/email | Create new email campaign [**createEmailRssCampaign**](EmailApi.md#createEmailRssCampaign) | **POST** /campaigns/email/rss | Create new email rss campaign [**patchEmailCampaign**](EmailApi.md#patchEmailCampaign) | **PATCH** /campaigns/email/{campaign_hash} | Update a specific email campaign ## actionEnableEmailRss > AcceptedResponse actionEnableEmailRss(campaignHash) Enables a rss email campaign Enables a rss email message ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.EmailApi(); let campaignHash = "campaignHash_example"; // String | Hash of the Campaign apiInstance.actionEnableEmailRss(campaignHash, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignHash** | **String**| Hash of the Campaign | ### Return type [**AcceptedResponse**](AcceptedResponse.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## actionSendEmail > AcceptedResponse actionSendEmail(campaignHash, campaignEmailSendRequest) Send email message Deploys and sends an email message ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.EmailApi(); let campaignHash = "campaignHash_example"; // String | Hash of the Campaign let campaignEmailSendRequest = new egoisdk.CampaignEmailSendRequest(); // CampaignEmailSendRequest | Parameters for the 'send email' action apiInstance.actionSendEmail(campaignHash, campaignEmailSendRequest, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignHash** | **String**| Hash of the Campaign | **campaignEmailSendRequest** | [**CampaignEmailSendRequest**](CampaignEmailSendRequest.md)| Parameters for the 'send email' action | ### Return type [**AcceptedResponse**](AcceptedResponse.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## createEmailCampaign > HashcodeCampaign createEmailCampaign(emailCampaignCreate) Create new email campaign Create a new email campaign ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.EmailApi(); let emailCampaignCreate = new egoisdk.EmailCampaignCreate(); // EmailCampaignCreate | Parameters for the Email Campaign apiInstance.createEmailCampaign(emailCampaignCreate, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **emailCampaignCreate** | [**EmailCampaignCreate**](EmailCampaignCreate.md)| Parameters for the Email Campaign | ### Return type [**HashcodeCampaign**](HashcodeCampaign.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## createEmailRssCampaign > HashcodeCampaign createEmailRssCampaign(emailRssCampaignCreate) Create new email rss campaign Create a new email rss campaign ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.EmailApi(); let emailRssCampaignCreate = new egoisdk.EmailRssCampaignCreate(); // EmailRssCampaignCreate | Parameters for the Email Campaign apiInstance.createEmailRssCampaign(emailRssCampaignCreate, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **emailRssCampaignCreate** | [**EmailRssCampaignCreate**](EmailRssCampaignCreate.md)| Parameters for the Email Campaign | ### Return type [**HashcodeCampaign**](HashcodeCampaign.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## patchEmailCampaign > HashcodeCampaign patchEmailCampaign(campaignHash, emailCampaignPatch) Update a specific email campaign Update email campaign ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.EmailApi(); let campaignHash = "campaignHash_example"; // String | Hash of the Campaign let emailCampaignPatch = new egoisdk.EmailCampaignPatch(); // EmailCampaignPatch | Parameters for the Email Campaign apiInstance.patchEmailCampaign(campaignHash, emailCampaignPatch, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignHash** | **String**| Hash of the Campaign | **emailCampaignPatch** | [**EmailCampaignPatch**](EmailCampaignPatch.md)| Parameters for the Email Campaign | ### Return type [**HashcodeCampaign**](HashcodeCampaign.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json