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 |
createList | POST /contacts/lists | Create a list |
deleteList | DELETE /contacts/lists/{listId} | Delete a list |
getContactsFromList | GET /contacts/lists/{listId}/contacts | Get contacts in a list |
getFolderLists | GET /contacts/folders/{folderId}/lists | Get lists in a folder |
getList | GET /contacts/lists/{listId} | Get a list's details |
getLists | GET /contacts/lists | Get all the lists |
removeContactFromList | POST /contacts/lists/{listId}/contacts/remove | Delete a contact from a list |
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.ListsApi();
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
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.ListsApi();
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
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.ListsApi();
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
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.ListsApi();
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
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.ListsApi();
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
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.ListsApi();
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.ListsApi();
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
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.ListsApi();
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
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.ListsApi();
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