Overview
API calls allow third-party systems to interact with Salesflow. There are several ways to make an API call, including using programming languages, command line tools, API client frameworks, and more.
In this article, we will be using API client frameworks, which is Postman. You can download Postman here or use it online.
Once you have downloaded the software, you will see this screen:
Here's where you will be making your API calls. To get started right away, click Workspaces > My Workspace, or create a new workspace if preferred.
How to start making API calls?
Before you begin, some requests will require your API token.
You can get it by going to:
Settings > LinkedIn account settings > scroll down and you will see Account API token
To create your API request in Postman:
Hover over your collection name until you see the three dots
Click the dots and select Add request
3. After clicking, add request, you will see an interface. Start by placing the URL where we are going to be making the request to. In this case, we will be making the request to https://app.salesflow.io/api/statistics/GetCampaignStatistics but this can change depending on the request.
4. After placing the URL, we need to enter the parameters. We are getting campaign statistics, and this request requires accountId, campaignId, and token in the parameters tab. To add the parameters, simply type the name of the parameter in the key field.
So far, it should look like this
5. After entering those values, click send, and you should get a 200 OK status as below:
6. Once you click send, the information will be shown:
What actions can I make with API calls in Salesflow?
Currently, the following API actions are available:
Get Campaign Statistics
This method retrieves campaign statistics for a specific campaign.
Method: GET
Parameters
accountId - selected accountId
campaignId - selected campaignId
token - API token, obtained for selected accountId
isForceRequest - true
Example:
The result will be:
Import Member
This method allows you to add a new contact (campaign member) to a campaign. This can also be done manually using the CSV import feature.
Method: GET
Parameters:
accountId - selected accountId
campaignId - selected campaignId
token - API token, obtained for selected accountId
linkedInUrl - LinkedIn profile URL of a contact to be added
firstName, lastName, occupation, location [Optional]
customFields: Array of strings for custom fields [Optional]
Example:
https://mvc.salesflow.io/api/members/Import?campaignId=YOUR_CAMPAIGN_ID&accountId=YOUR_ACCOUNT_ID&token=YOUR_API_TOKEN&linkedInUrl=CONTACT_LINKEDIN_URL&firstName=CONTACT_FIRST_NAME&lastName=CONTACT_LAST_NAME&occupation=CONTACT_OCCUPATION&location=CONTACT_LOCATION&customFields=Custom1&customFields=Custom2&customFields=Custom3
Note: Custom Fields will appear on the message in the order that you add them, from top to bottom. For example, the first one will be custom variable 1 on your message, the second one on the row will be custom variable 2, and so on.
The result will be:
Update Contact
This method allows to update an existing contact (campaign member), meaning to change the existing details.
Method: POST
Parameters:
memberId - selected memberId
accountId - selected accountId
token - API token, obtained for selected accountId
Body Parameters:
firstName - first name, maximum length = 63
lastName - last name, maximum length = 63
location - location, maximum length = 127
occupation - occupation, maximum length = 1023
industry - industry, maximum length = 1023
email - email, maximum length = 1023
phone - phone, maximum length = 1023
company - company, maximum length = 1023
Example:
--header 'Content-Type: application/json' \
--data-raw '{
"lastName": "Doe",
"FirstName": "John",
"Location": "New York",
"Occupation": "CEO",
"Industry": "marketing",
"Email": "johnDoe@dohnDoe.host",
"Phone": "1555123458"
}'
The result should look like this:
GetContact (by memberId)
This method allows you to get contact (campaign member), and to display all the information about it.
Endpoint: https://mvc.salesflow.io/api/members/{memberId}
Method: GET
Parameters:
memberId – selected memberId
accountId – selected accountId
token – API token, obtained for selected accountId
Example:
The result should look like this:
CampaignId property can be null.
Status property can have the below values:
MEMBER_NOT_SET = 0
MEMBER_PENDING = 1
MEMBER_INVITATION_SENT = 2
MEMBER_CONNECTED = 4
MEMBER_DISCONNECTED = 8
MEMBER_DELETED = 16
MEMBER_IMPORTED = 32
MEMBER_INVITATION_WITHDRAWN = 64
MEMBER_ERROR = 1024
MEMBER_DUPLICATE = 2048
GetContact (by public identifier)
This method allows to get a contact (campaign member), and to display all the information about it, but instead of a memberId, it uses the public identifier.
Endpoint: https://mvc.salesflow.io/api/members/
Method: GET
Parameters:
publicIdentifier - member’s public identifier
accountId - selected accountId
token - API token, obtained for selected accountId
Example:
The result will be:
Delete Contact
This method allows you to delete a contact (campaign member), directly from a campaign.
Endpoint: https://mvc.salesflow.io/api/members
Method: DELETE
Parameters:
memberId - selected memberId
accountId - selected accountId
token - API token, obtained for selected accountId
Example:
The result will be:
List Contacts (by public identifiers)
This method allows you to get a list of available contacts by provided public identifiers.
Method: POST
Parameters:
accountId - selected accountId
token - API token, obtained for selected accountId
Body parameters
publicIdentifiers: collection of public identifiers
Public identifiers can't be null or empty; they can have more than 20 elements.
Example:
--header 'Content-Type: application/json' \
--data-raw '{
"PublicIdentifiers": [
"identity1",
"identity2",
"identity3" ],
"UpdatedFromDate": "2022-07-29 06:45:15"
}’
The result should look like this:
List Contacts (by campaignId)
This method allows you to get a list of available contacts (campaign members) for a selected campaign.
Method: GET
Parameters
accountId - selected accountId
campaignId - selected campaignId
token - API token, obtained for selected accountId
Example:
The result should look like this:
List campaigns
This method allows you to get a list of available campaigns.
Method: GET
Parameters:
accountId - selected accountId
token - API token, obtained for selected accountId
Example:
https://mvc.salesflow.io/api/campaigns/list-campaigns?accountId=YOUR_ACCOUNT_ID&token=YOUR_API_TOKEN
The result will be:
Start a Campaign
This method allows you to start a campaign.
Method: POST
Parameters:
campaignId - selected campaignId
accountId - selected accountId
token - API token, obtained for selected accountId
Example:
The result will be:
List Accounts
This method allows you to get a list of accounts by using the API Token.
Method: GET
Parameters:
token - API token
Example
The result will be:
List accounts by Domain
This method allows you to get a list of available accounts assigned to a provided domain.
Endpoint: https://mvc.salesflow.io/api/
Method: GET
Resource: accounts/list-by-domain
Parameters:
domainToken - API token assigned to domain
domainHostName - domain host name where token is assigned to
Example:
Email integration status can have one of the following:
2 - Active
5 - Error
The result will look like this:
Webhooks
Webhooks allow you to make outgoing calls from Salesflow to any external site by URL, provided by the 3rd-party site. They can be configured in your campaign settings under the Integrations section and are triggered by one of the following events:
MEMBER_CONNECTED - triggered when the system detects that a campaign member’s status has changed to Connected.
REPLY_DETECTED - triggered when the system detects an incoming message from a contact. This event is not triggered if the contact is muted.
INVITATION_WITHDRAWN - triggered when the system successfully withdraws an invitation for a contact.
FOLLOW_UP - triggered when the system successfully sends a follow-up message to a contact. This event can be triggered only once per member per integration.
Data sample:
The data sent by the system is a regular POST request, containing a normal JSON as the request body. The following data sample illustrates this:
{
"IntegrationType": "INTEGRATION_TYPE_WEBHOOK",
"IntegrationRunOn": "INTEGRATION_RUN_ON_CONNECTED",
"MemberId": 0,
"LinkedInMemberId": 1234567890,
"FirstName": "John",
"LastName": "Smith",
"Occupation": "Founder and Chief Executive Officer at Smith & Co",
"Company": "Smith & Co",
"Location": "Miami/Fort Lauderdale Area",
"PhoneNumber": "123 4567890",
"Email": "smith1234@gmail.com",
"Address": "",
"BirthdayYear": 1980,
"BirthdayMonth": 12,
"BirthdayDay": 1,
"DateAdded": "2021-02-18T15:33:44.5905705+00:00",
"ConnectedAt": "2021-02-18T16:33:44.5905705+00:00",
"MemberUrl": "https://linkedin.com/in/john-smith-123321",
"Industry": "Banking",
"Distance": "DISTANCE_3",
"IsMuted": false,
"CurrentPosition": "Chief Executive Officer",
"Status": "MEMBER_CONNECTED",
"HasReply": false,
"IsMuted": false,
"IsSeen": false,
"ConnectionsCount": 100,
"FollowersCount": 100,
"IsSalesNavigator": false,
"LinkedInAccount": {
"FirstName": "Bob",
"LastName": "White",
"Username": "some@username.com"
},
"Custom1": "CustomValue1",
"Custom2": "CustomValue2",
"Custom3": "CustomValue3",
"Custom4": "CustomValue4",
"Custom5": "CustomValue5",
"Custom6": "CustomValue6",
"Custom7": "CustomValue7",
"Custom8": "CustomValue8",
"Custom9": "CustomValue9",
"Custom10": "CustomValue10",
"MemberActionsFormatted": "<p>Connection message [2/18/2021 4:33 PM]: This is a test connection message</p>\r\n\r\n<p>John Smith [2/18/2021 4:33 PM]: This is a test inbound message</p>",
"MemberCampaigns": [
{
"CampaignName": "Test campaign"
}
]
}
Create Webhook
This method allows you to create a Webhook.
Method: POST
Parameters:
accountId - selected accountId
token - API token, obtained for selected accountId
Body Parameters:
Name - webhook name, required, maximum length = 255
Url - webhook url, required, maximum length = 511
DisableForMutedContacts - optional, nullable boolean, if true - will not get triggered for muted contacts
Example:
Request URL: https://mvc.salesflow.io/api/webhooks/create?token=YOUR_API_TOKEN&accountId=YOUR_ACCOUNT_ID
Request Body:
The result will be:
Delete Webhook
This method allows you to delete a Webhook.
Method: DELETE
Parameters:
webhookId - selected webhookId
accountId - selected accountId
token - API token, obtained for selected accountId
Example:
The result will be:
List Webhooks
This method allows you to get a list of available Webhooks.
Method: GET
Parameters:
accountId - selected accountId
token - API token, obtained for selected accountId
Example:
The result will look like this:
AttachedWebhookCampaigns property is a collection which contains the below information:
CampaignId - Campaign identifiers
WebhookCampaignId - WebhookCampaignId identifier. This value should be used to detach integration.
RunOn - Selected event type (MEMBER_CONNECTED, REPLY_DETECTED, INVITATION_WITHDRAWN)
Attach Webhook
This method allows you to attach a webhook to a campaign.
Method: POST
Parameters:
accountId - selected accountId
webhookId - selected webhookId
campaignId - selected campaignId
runOn - selected event type (integer)
token - API token, obtained for selected accountId
The property runOn can have the below values:
1 - MEMBER_CONNECTED - Triggered when the system detects that a campaign member’s status has changed to Connected.
2 - REPLY_DETECTED - Triggered when the system detects an incoming message from a contact. This event will not be triggered if the contact is currently muted.
7 - INVITATION_WITHDRAWN - Triggered when the system successfully withdraws a connection invitation for a contact.
Every integration can be attached up to 3 times to the same campaign, but with a different “runOn” parameter.
Example:
The result should look like this:
Detach Webhook
This method allows you to detach a webhook from a campaign.
Method: POST
Parameters:
accountId - selected accountId
webhookCampaignId - selected webhookCampaignId
token - API token, obtained for selected accountId
The result should look like this:
List contacts by account ID
This method allows you to get all contacts across all campaigns by account ID.
Endpoint: https://mvc.salesflow.io/api/
Method: GET
Resource: members/list-contacts-by-accountid
Parameters:
token - API token, obtained for selected accountId
accountId - selected accountId
updatedFromDate - optional parameter
If UpdatedFromDate is present, the results will contain only members that were updated after the provided date.
Example:
The result should look like this:
Get analytics by campaign ID
This method allows you to query analytics data by campaign ID.
Endpoint: https://mvc.salesflow.io/api/
Method: GET
Resource: analytics/by-campaignid
Parameters:
token - API token of selected account ID
accountId - selected account ID
campaignId - selected campaign ID
from - date
to - date
Example:
The result should look like this:
Get analytics by account ID
This method allows you to query analytics data by account ID.
Endpoint: https://mvc.salesflow.io/api/
Method: GET
Resource: analytics/by-accountid
Parameters:
token - API token of selected account ID
accountId - selected account ID
from - date
to - date
Example:
The result should look like this:
List incoming messages by account ID
This method allows you to query incoming messages by account ID.
Endpoint: https://mvc.salesflow.io/api/
Method: GET
Resource: messaging/incoming-messages-by-accountid
Parameters:
token - API token, obtained for selected accountId
accountId - selected accountId
from - date
Example:
The result should look like this:
List incoming messages by campaign ID
This method allows you to query incoming messages by campaign ID.
Endpoint: https://mvc.salesflow.io/api/
Method: GET
Resource: messaging/incoming-messages-by-campaignid
Parameters:
token - API token of selected account ID
accountId - selected account ID
campaignId - selected campaign ID
from - date
Example:
The result should look like this:
Mute/Unmute Contacts
This method allows you to mute or unmute an existing contact.
Endpoint: https://mvc.salesflow.io/api/
Method: PATCH
Resource: members/{memberId}
Parameters:
memberId - selected memberId
accountId - selected accountId
token - API token, obtained for selected accountId
Body Parameters:
IsMuted - boolean, nullable
Example:
curl --request PATCH 'https://mvc.salesflow.io/api/members/46875434?token=abcdefghijklmnop123&accountId=321' \
--header 'Content-Type: application/json' \
--data-raw '{
"IsMuted ": true
}
The result should look like this:
Hope you found this article helpful! If you have any questions, do not hesitate to contact us via the support chat or at support@salesflow.io
You might be interested in

































