All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
createSmsCampaign | POST /smsCampaigns | Creates an SMS campaign |
deleteSmsCampaign | DELETE /smsCampaigns/{campaignId} | Delete an SMS campaign |
getSmsCampaign | GET /smsCampaigns/{campaignId} | Get an SMS campaign |
getSmsCampaigns | GET /smsCampaigns | Returns the information for all your created SMS campaigns |
requestSmsRecipientExport | POST /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients |
sendSmsCampaignNow | POST /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately |
sendSmsReport | POST /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report |
sendTestSms | POST /smsCampaigns/{campaignId}/sendTest | Send a test SMS campaign |
updateSmsCampaign | PUT /smsCampaigns/{campaignId} | Update an SMS campaign |
updateSmsCampaignStatus | PUT /smsCampaigns/{campaignId}/status | Update a campaign's status |
CreateModel createSmsCampaign(createSmsCampaign)
Creates an SMS campaign
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var createSmsCampaign = new SibApiV3Sdk.CreateSmsCampaign(); // CreateSmsCampaign | Values to create an SMS Campaign
apiInstance.createSmsCampaign(createSmsCampaign).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
createSmsCampaign | CreateSmsCampaign | Values to create an SMS Campaign |
- Content-Type: application/json
- Accept: application/json
deleteSmsCampaign(campaignId)
Delete an SMS campaign
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the SMS campaign
apiInstance.deleteSmsCampaign(campaignId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the SMS campaign |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetSmsCampaign getSmsCampaign(campaignId)
Get an SMS campaign
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the SMS campaign
apiInstance.getSmsCampaign(campaignId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the SMS campaign |
- Content-Type: application/json
- Accept: application/json
GetSmsCampaigns getSmsCampaigns(opts)
Returns the information for all your created SMS campaigns
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var opts = {
'status': "status_example", // String | Status of campaign.
'startDate': "startDate_example", // String | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
'endDate': "endDate_example", // String | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
'limit': 500, // Number | Number limitation for the result returned
'offset': 0, // Number | Beginning point in the list to retrieve from.
'sort': "desc" // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
};
apiInstance.getSmsCampaigns(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
status | String | Status of campaign. | [optional] |
startDate | String | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] |
endDate | String | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] |
limit | Number | Number limitation for the result returned | [optional] [default to 500] |
offset | Number | Beginning point in the list to retrieve from. | [optional] [default to 0] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if sort is not passed |
[optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
CreatedProcessId requestSmsRecipientExport(campaignId, opts)
Export an SMS campaign's recipients
It returns the background process ID which on completion calls the notify URL that you have set in the input.
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the campaign
var opts = {
'recipientExport': new SibApiV3Sdk.RequestSmsRecipientExport() // RequestSmsRecipientExport | Values to send for a recipient export request
};
apiInstance.requestSmsRecipientExport(campaignId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the campaign | |
recipientExport | RequestSmsRecipientExport | Values to send for a recipient export request | [optional] |
- Content-Type: application/json
- Accept: application/json
sendSmsCampaignNow(campaignId)
Send your SMS campaign immediately
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the campaign
apiInstance.sendSmsCampaignNow(campaignId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the campaign |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
sendSmsReport(campaignId, sendReport)
Send an SMS campaign's report
Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the campaign
var sendReport = new SibApiV3Sdk.SendReport(); // SendReport | Values for send a report
apiInstance.sendSmsReport(campaignId, sendReport).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the campaign | |
sendReport | SendReport | Values for send a report |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
sendTestSms(campaignId, phoneNumber)
Send a test SMS campaign
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | Id of the SMS campaign
var phoneNumber = new SibApiV3Sdk.SendTestSms(); // SendTestSms | Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted
apiInstance.sendTestSms(campaignId, phoneNumber).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | Id of the SMS campaign | |
phoneNumber | SendTestSms | Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateSmsCampaign(campaignId, updateSmsCampaign)
Update an SMS campaign
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the SMS campaign
var updateSmsCampaign = new SibApiV3Sdk.UpdateSmsCampaign(); // UpdateSmsCampaign | Values to update an SMS Campaign
apiInstance.updateSmsCampaign(campaignId, updateSmsCampaign).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the SMS campaign | |
updateSmsCampaign | UpdateSmsCampaign | Values to update an SMS Campaign |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateSmsCampaignStatus(campaignId, status)
Update a campaign's status
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
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';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.SMSCampaignsApi();
var campaignId = 789; // Number | id of the campaign
var status = new SibApiV3Sdk.UpdateCampaignStatus(); // UpdateCampaignStatus | Status of the campaign.
apiInstance.updateSmsCampaignStatus(campaignId, status).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
campaignId | Number | id of the campaign | |
status | UpdateCampaignStatus | Status of the campaign. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json