All URIs are relative to https://api.sendinblue.com/v3
| Method | HTTP request | Description |
|---|---|---|
| createFolder | POST /contacts/folders | Create a folder |
| deleteFolder | DELETE /contacts/folders/{folderId} | Delete a folder (and all its lists) |
| getFolder | GET /contacts/folders/{folderId} | Returns folder details |
| getFolderLists | GET /contacts/folders/{folderId}/lists | Get the lists in a folder |
| getFolders | GET /contacts/folders | Get all the folders |
| updateFolder | PUT /contacts/folders/{folderId} | Update a contact folder |
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';
var apiInstance = new SibApiV3Sdk.FoldersApi();
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
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';
var apiInstance = new SibApiV3Sdk.FoldersApi();
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
GetFolder getFolder(folderId)
Returns folder 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';
var apiInstance = new SibApiV3Sdk.FoldersApi();
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 the 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';
var apiInstance = new SibApiV3Sdk.FoldersApi();
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
};
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] |
- Content-Type: application/json
- Accept: application/json
GetFolders getFolders(limit, offset)
Get all the 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';
var apiInstance = new SibApiV3Sdk.FoldersApi();
var limit = 10; // Number | Number of documents per page
var offset = 0; // Number | Index of the first document of the page
apiInstance.getFolders(limit, offset).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] |
- Content-Type: application/json
- Accept: application/json
updateFolder(folderId, updateFolder)
Update a contact 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';
var apiInstance = new SibApiV3Sdk.FoldersApi();
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