All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
addContactToList | POST /contacts/lists/{listId}/contacts/add | Add existing contacts to a list |
createAttribute | POST /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute |
createContact | POST /contacts | Create a contact |
createDoiContact | POST /contacts/doubleOptinConfirmation | Create Contact via DOI (Double-Opt-In) Flow |
createFolder | POST /contacts/folders | Create a folder |
createList | POST /contacts/lists | Create a list |
deleteAttribute | DELETE /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute |
deleteContact | DELETE /contacts/{identifier} | Delete a contact |
deleteFolder | DELETE /contacts/folders/{folderId} | Delete a folder (and all its lists) |
deleteList | DELETE /contacts/lists/{listId} | Delete a list |
getAttributes | GET /contacts/attributes | List all attributes |
getContactInfo | GET /contacts/{identifier} | Get a contact's details |
getContactStats | GET /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact |
getContacts | GET /contacts | Get all the contacts |
getContactsFromList | GET /contacts/lists/{listId}/contacts | Get contacts in a list |
getFolder | GET /contacts/folders/{folderId} | Returns a folder's details |
getFolderLists | GET /contacts/folders/{folderId}/lists | Get lists in a folder |
getFolders | GET /contacts/folders | Get all folders |
getList | GET /contacts/lists/{listId} | Get a list's details |
getLists | GET /contacts/lists | Get all the lists |
importContacts | POST /contacts/import | Import contacts |
removeContactFromList | POST /contacts/lists/{listId}/contacts/remove | Delete a contact from a list |
requestContactExport | POST /contacts/export | Export contacts |
updateAttribute | PUT /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute |
updateBatchContacts | POST /contacts/batch | Update multiple contacts |
updateContact | PUT /contacts/{identifier} | Update a contact |
updateFolder | PUT /contacts/folders/{folderId} | Update a folder |
updateList | PUT /contacts/lists/{listId} | Update a list |
PostContactInfo addContactToList(listId, contactEmails)
Add existing contacts to a list
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.ContactsApi();
var listId = 789; // Number | Id of the list
var contactEmails = new SibApiV3Sdk.AddContactToList(); // AddContactToList | Emails addresses OR IDs of the contacts
apiInstance.addContactToList(listId, contactEmails).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
listId | Number | Id of the list | |
contactEmails | AddContactToList | Emails addresses OR IDs of the contacts |
- Content-Type: application/json
- Accept: application/json
createAttribute(attributeCategory, attributeName, createAttribute)
Create contact attribute
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.ContactsApi();
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
var attributeName = "attributeName_example"; // String | Name of the attribute
var createAttribute = new SibApiV3Sdk.CreateAttribute(); // CreateAttribute | Values to create an attribute
apiInstance.createAttribute(attributeCategory, attributeName, createAttribute).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | |
attributeName | String | Name of the attribute | |
createAttribute | CreateAttribute | Values to create an attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateUpdateContactModel createContact(createContact)
Create a contact
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.ContactsApi();
var createContact = new SibApiV3Sdk.CreateContact(); // CreateContact | Values to create a contact
apiInstance.createContact(createContact).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
createContact | CreateContact | Values to create a contact |
- Content-Type: application/json
- Accept: application/json
createDoiContact(createDoiContact)
Create Contact via DOI (Double-Opt-In) Flow
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.ContactsApi();
var createDoiContact = new SibApiV3Sdk.CreateDoiContact(); // CreateDoiContact | Values to create the Double opt-in (DOI) contact
apiInstance.createDoiContact(createDoiContact).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
createDoiContact | CreateDoiContact | Values to create the Double opt-in (DOI) contact |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateModel createFolder(createFolder)
Create a folder
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.ContactsApi();
var createFolder = new SibApiV3Sdk.CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder
apiInstance.createFolder(createFolder).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
createFolder | CreateUpdateFolder | Name of the folder |
- Content-Type: application/json
- Accept: application/json
CreateModel createList(createList)
Create a list
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.ContactsApi();
var createList = new SibApiV3Sdk.CreateList(); // CreateList | Values to create a list
apiInstance.createList(createList).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
createList | CreateList | Values to create a list |
- Content-Type: application/json
- Accept: application/json
deleteAttribute(attributeCategory, attributeName)
Delete an attribute
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.ContactsApi();
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
var attributeName = "attributeName_example"; // String | Name of the existing attribute
apiInstance.deleteAttribute(attributeCategory, attributeName).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | |
attributeName | String | Name of the existing attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteContact(identifier)
Delete a contact
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.ContactsApi();
var identifier = "identifier_example"; // String | Email (urlencoded) OR ID of the contact
apiInstance.deleteContact(identifier).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
identifier | String | Email (urlencoded) OR ID of the contact |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteFolder(folderId)
Delete a folder (and all its lists)
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.ContactsApi();
var folderId = 789; // Number | Id of the folder
apiInstance.deleteFolder(folderId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
folderId | Number | Id of the folder |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteList(listId)
Delete a list
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.ContactsApi();
var listId = 789; // Number | Id of the list
apiInstance.deleteList(listId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
listId | Number | Id of the list |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAttributes getAttributes()
List all attributes
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.ContactsApi();
apiInstance.getAttributes().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetExtendedContactDetails getContactInfo(identifier, opts)
Get a contact's details
Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges.
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.ContactsApi();
var identifier = "identifier_example"; // String | Email (urlencoded) OR ID of the contact OR its SMS attribute value
var opts = {
'startDate': null, // Object | **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
'endDate': null // Object | **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
};
apiInstance.getContactInfo(identifier, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
identifier | String | Email (urlencoded) OR ID of the contact OR its SMS attribute value | |
startDate | Object | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] |
endDate | Object | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | [optional] |
- Content-Type: application/json
- Accept: application/json
GetContactCampaignStats getContactStats(identifier, opts)
Get email campaigns' statistics for a contact
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.ContactsApi();
var identifier = "identifier_example"; // String | Email (urlencoded) OR ID of the contact
var opts = {
'startDate': "startDate_example", // String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
'endDate': "endDate_example" // String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days
};
apiInstance.getContactStats(identifier, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
identifier | String | Email (urlencoded) OR ID of the contact | |
startDate | String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] |
endDate | String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days | [optional] |
- Content-Type: application/json
- Accept: application/json
GetContacts getContacts(opts)
Get all the contacts
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.ContactsApi();
var opts = {
'limit': 50, // Number | Number of documents per page
'offset': 0, // Number | Index of the first document of the page
'modifiedSince': "modifiedSince_example", // String | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
'sort': "desc" // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
};
apiInstance.getContacts(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | Number of documents per page | [optional] [default to 50] |
offset | Number | Index of the first document of the page | [optional] [default to 0] |
modifiedSince | String | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] |
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
GetContacts getContactsFromList(listId, opts)
Get contacts in a list
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.ContactsApi();
var listId = 789; // Number | Id of the list
var opts = {
'modifiedSince': "modifiedSince_example", // String | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
'limit': 50, // Number | Number of documents per page
'offset': 0, // Number | Index of the first document of the page
'sort': "desc" // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
};
apiInstance.getContactsFromList(listId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
listId | Number | Id of the list | |
modifiedSince | String | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] |
limit | Number | Number of documents per page | [optional] [default to 50] |
offset | Number | Index of the first document of the page | [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
GetFolder getFolder(folderId)
Returns a folder's details
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.ContactsApi();
var folderId = 789; // Number | id of the folder
apiInstance.getFolder(folderId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
folderId | Number | id of the folder |
- Content-Type: application/json
- Accept: application/json
GetFolderLists getFolderLists(folderId, opts)
Get lists in a folder
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.ContactsApi();
var folderId = 789; // Number | Id of the folder
var opts = {
'limit': 10, // Number | Number of documents per page
'offset': 0, // Number | Index of the first document of the page
'sort': "desc" // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
};
apiInstance.getFolderLists(folderId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
folderId | Number | Id of the folder | |
limit | Number | Number of documents per page | [optional] [default to 10] |
offset | Number | Index of the first document of the page | [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
GetFolders getFolders(limit, offset, opts)
Get all folders
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.ContactsApi();
var limit = 10; // Number | Number of documents per page
var offset = 0; // Number | Index of the first document of the page
var opts = {
'sort': "desc" // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
};
apiInstance.getFolders(limit, offset, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | Number of documents per page | [default to 10] |
offset | Number | Index of the first document of the page | [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
GetExtendedList getList(listId)
Get a list's details
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.ContactsApi();
var listId = 789; // Number | Id of the list
apiInstance.getList(listId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
listId | Number | Id of the list |
- Content-Type: application/json
- Accept: application/json
GetLists getLists(opts)
Get all the lists
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.ContactsApi();
var opts = {
'limit': 10, // Number | Number of documents per page
'offset': 0, // Number | Index of the first document of the page
'sort': "desc" // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
};
apiInstance.getLists(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | Number of documents per page | [optional] [default to 10] |
offset | Number | Index of the first document of the page | [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 importContacts(requestContactImport)
Import contacts
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.ContactsApi();
var requestContactImport = new SibApiV3Sdk.RequestContactImport(); // RequestContactImport | Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``
apiInstance.importContacts(requestContactImport).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
requestContactImport | RequestContactImport | Values to import contacts in Sendinblue. To know more about the expected format, please have a look at https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns |
- Content-Type: application/json
- Accept: application/json
PostContactInfo removeContactFromList(listId, contactEmails)
Delete a contact from a list
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.ContactsApi();
var listId = 789; // Number | Id of the list
var contactEmails = new SibApiV3Sdk.RemoveContactFromList(); // RemoveContactFromList | Emails addresses OR IDs of the contacts
apiInstance.removeContactFromList(listId, contactEmails).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
listId | Number | Id of the list | |
contactEmails | RemoveContactFromList | Emails addresses OR IDs of the contacts |
- Content-Type: application/json
- Accept: application/json
CreatedProcessId requestContactExport(requestContactExport)
Export contacts
It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
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.ContactsApi();
var requestContactExport = new SibApiV3Sdk.RequestContactExport(); // RequestContactExport | Values to request a contact export
apiInstance.requestContactExport(requestContactExport).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
requestContactExport | RequestContactExport | Values to request a contact export |
- Content-Type: application/json
- Accept: application/json
updateAttribute(attributeCategory, attributeName, updateAttribute)
Update contact attribute
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.ContactsApi();
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
var attributeName = "attributeName_example"; // String | Name of the existing attribute
var updateAttribute = new SibApiV3Sdk.UpdateAttribute(); // UpdateAttribute | Values to update an attribute
apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | |
attributeName | String | Name of the existing attribute | |
updateAttribute | UpdateAttribute | Values to update an attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateBatchContacts(updateBatchContacts)
Update multiple contacts
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.ContactsApi();
var updateBatchContacts = new SibApiV3Sdk.UpdateBatchContacts(); // UpdateBatchContacts | Values to update multiple contacts
apiInstance.updateBatchContacts(updateBatchContacts).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
updateBatchContacts | UpdateBatchContacts | Values to update multiple contacts |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateContact(identifier, updateContact)
Update a contact
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.ContactsApi();
var identifier = "identifier_example"; // String | Email (urlencoded) OR ID of the contact
var updateContact = new SibApiV3Sdk.UpdateContact(); // UpdateContact | Values to update a contact
apiInstance.updateContact(identifier, updateContact).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
identifier | String | Email (urlencoded) OR ID of the contact | |
updateContact | UpdateContact | Values to update a contact |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateFolder(folderId, updateFolder)
Update a folder
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.ContactsApi();
var folderId = 789; // Number | Id of the folder
var updateFolder = new SibApiV3Sdk.CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder
apiInstance.updateFolder(folderId, updateFolder).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
folderId | Number | Id of the folder | |
updateFolder | CreateUpdateFolder | Name of the folder |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateList(listId, updateList)
Update a list
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.ContactsApi();
var listId = 789; // Number | Id of the list
var updateList = new SibApiV3Sdk.UpdateList(); // UpdateList | Values to update a list
apiInstance.updateList(listId, updateList).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
listId | Number | Id of the list | |
updateList | UpdateList | Values to update a list |
null (empty response body)
- Content-Type: application/json
- Accept: application/json