View Categories

REST API

Adding New REST API Key #

A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. Mainflow provides REST API to manage various kinds of tasks and access mainflow data as well. In this tutorial, we will learn about mainflow REST API Management.

Go to mainflow Dashboard ➜ REST API ➜ Add New Key

If this is a fresh installation of mainflow or you did not add any managers yet you will see a popup saying create a manager similar to below screenshot:

crm rest api add new key add manager

To Add New Manager please visit this documentation: Add a New Manager

Now When you are done adding a mainflow Manager and note the email address and then Add a New Key by providing the name of the key and then associating the mainflow Manager to it.

crm add rest api key

After clicking on the Create Button you will be provided with an API Username and an API Password like the below screenshot:

crm rest api created

Please keep note of this which will be needed to use the REST API as credentials.

Testing API #

Now we will be testing this REST API access and a few methods below.

We will use a free tool Postman for this testing. Firstly, we need to add authorization and the type is Basic Auth for the authorization where we will be providing the Username and Password generated while creating the REST API key.

crm rest api test postman

Now are ready to go ahead and test our mainflow REST API.

Now we will be listing all the contacts of the mainflow by the HTTP Request.

Now Clicking on Send or requesting the data will send JSON formatted response data like the below screenshot. You will see a status code of 200 OK for a successful request.

crm rest api get result

Now we will be adding a contact into the mainflow by the HTTP Request which provides a few parameters regarding the information of the contact.

This also sends a JSON formatted response giving a message saying that “Successfully added the subscriber.

crm rest api post result

To learn more and deep about mainflow REST API please contact our support team. Thank you.

Subscribe