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 a folder's details |
getFolderLists | GET /contacts/folders/{folderId}/lists | Get lists in a folder |
getFolders | GET /contacts/folders | Get all folders |
updateFolder | PUT /contacts/folders/{folderId} | Update a 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';
// 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.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';
// 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.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 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.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 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.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
'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.FoldersApi();
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
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.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