API’s (Application Programming Interface) are a powerful tool for automating tasks, and that includes adding new contacts to your MailRush.io campaign. In this video tutorial, we’ll show you how to use the MailRush.io API to import new contacts to your campaign, so you can keep your list up-to-date and automate the process of adding new contacts.
First, log into the MailRush.io dashboard and go to “Settings” from the left sidebar and click on the “API Key” menu option. Use the “copy” button to copy the API key.
Once you have your API key, you’ll need to refer to the API documentation. You can access the documentation by clicking the “API documentation” link.
From the API documentation page, click on “add subscriber to a campaign” from the left menu. This option will take you to the method that we need to use. This method documentation will provide the required parameters to build your API request. In this example, we will use “Postman” to build the request, but the process is similar for your specific programming language.
You need to take note the URL endpoint needed for the request, and we will use a POST request. Also, for the “content-type,” you are required to use the “x-www-form-urlencoded” option.
Next, you will need to specify all the required body parameters with their respective values. For this example, we are importing a contact with the name “Jorge” with his email address, and we will use the “custom1” field for the company name. The value for the “status” parameter should be “subscribed.” If you are not using the rest of the custom fields, you can leave the value blank.
Once you have made your request, you can test it. If the response to your request is successful, you will get the message “contact subscribed,” and the contact will be present in the contact list for your campaign.
By using the API to import new contacts, you can automate the process of adding new contacts to your campaign and save time. This feature is useful if you want to manage your contact lists in a more efficient way, such as CRMs. Thanks to this feature, you can increase your campaign performance and save time.