NAV
shell javascript

Introduction

Welcome to the SalesBlink API! You can use our API to access SalesBlink API endpoints, which can get information on campaigns, prospects and more.

We have language bindings in Shell, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "Authorization: your_salesblink_key"
var axios = require('axios');

var config = {
  method: 'get',
  url: 'api_endpoint_here',
  headers: { 
    'Authorization': 'your_salesblink_key'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Make sure to replace your_salesblink_key with your API key.

SalesBlink uses API keys to allow access to the API. You can register a new SalesBlink API key from integrations page.

SalesBlink expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: your_salesblink_key

Campaigns

Get All Campaigns

curl --location --request GET 'https://run.salesblink.io/api/campaigns' \
--header 'Authorization: your_salesblink_key'
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://run.salesblink.io/api/campaigns',
  headers: { 
    'Authorization': 'your_salesblink_key'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint retrieves all campaigns.

HTTP Request

GET https://run.salesblink.io/api/campaigns

You will receive a campaignID for each of the campaigns you have access to, you can use this to perform different API requests.

Get a Specific Campaign

curl --location --request GET 'https://run.salesbllink.io/api/campaign/<campaignID>' \
--header 'Authorization: your_salesblink_key'
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://run.salesbllink.io/api/campaign/<campaignID>',
  headers: { 
    'Authorization': 'your_salesblink_key'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint retrieves a specific campaign by its campaignID.

HTTP Request

GET https://run.salesbllink.io/api/campaign/<campaignID>

URL Parameters

Parameter Description
campaignID The ID of the campaign to retrieve

Pause a Campaign

curl --location --request POST 'https://run.salesblink.io/api/campaign-status' \
--header 'Authorization: your_salesblink_key' \
--header 'Content-Type: application/json'
--data-raw '{
    "campaignID": "<campaignID>",
    "pause": true
}'
var axios = require('axios');
var data = JSON.stringify({
  "campaignID": "<campaignID>",
  "pause": true
});

var config = {
  method: 'post',
  url: 'https://run.salesblink.io/api/campaign-status',
  headers: { 
    'Authorization': 'your_salesblink_key', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint pauses a specific campaign.

HTTP Request

POST https://run.salesblink.io/api/campaign-status

Body Parameters

Parameter Description Type
campaignID The ID of the campaign to pause string
pause The ID of the campaign to pause bool (true,false)

UnPause a Campaign

curl --location --request POST 'https://run.salesblink.io/api/campaign-status' \
--header 'Authorization: your_salesblink_key' \
--header 'Content-Type: application/json'
--data-raw '{
    "campaignID": "<campaignID>",
    "pause": false
}'
var axios = require('axios');
var data = JSON.stringify({
  "campaignID": "<campaignID>",
  "pause": false
});

var config = {
  method: 'post',
  url: 'https://run.salesblink.io/api/campaign-status',
  headers: { 
    'Authorization': 'your_salesblink_key', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint pauses a specific campaign.

HTTP Request

POST https://run.salesblink.io/api/campaign-status

Body Parameters

Parameter Description Type
campaignID The ID of the campaign to pause string
pause The ID of the campaign to pause bool (true,false)

Prospects

List Prospects

curl --location --request GET 'https://run.salesblink.io/api/prospects/<campaignID>' \
--header 'Authorization: your_salesblink_key'
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://run.salesblink.io/api/prospects/<campaignID>',
  headers: { 
    'Authorization': 'your_salesblink_key'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint retrieves all prospects for a specific campaign.

HTTP Request

GET https://run.salesblink.io/api/prospects/<campaignID>

URL Parameters

Parameter Description
campaignID The ID of the campaign

Get Prospect

curl --location --request GET 'https://run.salesblink.io/api/prospect/<prospectID>' \
--header 'Authorization: your_salesblink_key'
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://run.salesblink.io/api/prospect/<prospectID>',
  headers: { 
    'Authorization': 'your_salesblink_key'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint retrieves a specific prospects for a specific campaign.

HTTP Request

GET https://run.salesblink.io/api/prospect/<prospectID>

URL Parameters

Parameter Description
prospectID The ID of the prospect to retrieve

Add Prospect

curl --location --request POST 'https://run.salesblink.io/api/prospect-add' \
--header 'Authorization: your_salesblink_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "campaignID": "",
    "data": {
        "First Name": "Sushant",
        "Last Name": "Shekhar",
        "Email":"[email protected]",
        "Company": "SalesBlink",
        "Example Key": "Any Value",
        "Extra Key":"Any Value"
    }
}'
var axios = require('axios');
var data = JSON.stringify({
  "campaignID": "",
  "data": {
    "First Name": "Sushant",
    "Last Name": "Shekhar",
    "Email": "[email protected]",
    "Company": "SalesBlink",
    "Example Key": "Any Value",
    "Extra Key": "Any Value"
  }
});

var config = {
  method: 'post',
  url: 'https://run.salesblink.io/api/prospect-add',
  headers: { 
    'Authorization': 'your_salesblink_key', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint adds a prospect to a campaign

These fields can be used as macros in your email, LinkedIn and phone campaigns.

HTTP Request

POST https://run.salesblink.io/api/prospect-add

Body Parameters

Parameter Description Type
campaignID The ID of the campaign where prospect is added string
data Object containing custom fields for the prospect object

Update Prospect

curl --location --request POST 'https://run.salesblink.io/api/prospect' \
--header 'Authorization: your_salesblink_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prospectID": "<prospectID>",
    "key":"<key_to_update>",
    "value":"<value_to_update>"
}'
var axios = require('axios');
var data = JSON.stringify({
  "prospectID": "<prospectID>",
  "key": "<key_to_update>",
  "value": "<value_to_update>"
});

var config = {
  method: 'post',
  url: 'https://run.salesblink.io/api/prospect',
  headers: { 
    'Authorization': 'your_salesblink_key', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint updates fields a specific prospect.

These fields can be used as macros in your email, LinkedIn and phone campaigns.

HTTP Request

POST https://run.salesblink.io/api/prospect

Body Parameters

Parameter Description Type
prospectID The ID of the prospect to update string
key Key to update. Ex. email string
value Value to update. Ex. [email protected] string

Unsubscribe Prospect

curl --location --request POST 'https://run.salesblink.io/api/prospect-unsubscribe' \
--header 'Authorization: your_salesblink_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prospectID": "<prospectID>"
}'
var axios = require('axios');
var data = JSON.stringify({
  "prospectID": "<prospectID>"
});

var config = {
  method: 'post',
  url: 'https://run.salesblink.io/api/prospect-unsubscribe',
  headers: { 
    'Authorization': 'your_salesblink_key', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});


This endpoint unsubscribed a specific prospect. All their upcoming email, LinkedIn and call tasks are deleted.

HTTP Request

POST https://run.salesblink.io/api/prospect-unsubscribe

Body Parameters

Parameter Description Type
prospectID The ID of the prospect to unsubscribe string

Team

List Members

curl --location --request GET 'https://run.salesblink.io/api/my-team' \
--header 'Authorization: your_salesblink_key'
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://run.salesblink.io/api/my-team',
  headers: { 
    'Authorization': 'your_salesblink_key'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

This endpoint retrieves members of your current team.

HTTP Request

GET https://run.salesblink.io/api/my-team

Errors

The SalesBlink API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The request is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access SalesBlink with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.