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
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FoldersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FoldersApi apiInstance = new FoldersApi();
CreateUpdateFolder createFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder
try {
CreateModel result = apiInstance.createFolder(createFolder);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FoldersApi#createFolder");
e.printStackTrace();
}
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)
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FoldersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FoldersApi apiInstance = new FoldersApi();
Long folderId = 789L; // Long | Id of the folder
try {
apiInstance.deleteFolder(folderId);
} catch (ApiException e) {
System.err.println("Exception when calling FoldersApi#deleteFolder");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
folderId | Long | Id of the folder |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetFolder getFolder(folderId)
Returns a folder's details
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FoldersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FoldersApi apiInstance = new FoldersApi();
Long folderId = 789L; // Long | id of the folder
try {
GetFolder result = apiInstance.getFolder(folderId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FoldersApi#getFolder");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
folderId | Long | id of the folder |
- Content-Type: application/json
- Accept: application/json
GetFolderLists getFolderLists(folderId, limit, offset, sort)
Get lists in a folder
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FoldersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FoldersApi apiInstance = new FoldersApi();
Long folderId = 789L; // Long | Id of the folder
Long limit = 10L; // Long | Number of documents per page
Long offset = 0L; // Long | Index of the first document of the page
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
try {
GetFolderLists result = apiInstance.getFolderLists(folderId, limit, offset, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FoldersApi#getFolderLists");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
folderId | Long | Id of the folder | |
limit | Long | Number of documents per page | [optional] [default to 10] |
offset | Long | 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] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
GetFolders getFolders(limit, offset, sort)
Get all folders
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FoldersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FoldersApi apiInstance = new FoldersApi();
Long limit = 10L; // Long | Number of documents per page
Long offset = 0L; // Long | Index of the first document of the page
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
try {
GetFolders result = apiInstance.getFolders(limit, offset, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FoldersApi#getFolders");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Long | Number of documents per page | [default to 10] |
offset | Long | 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] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
updateFolder(folderId, updateFolder)
Update a folder
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FoldersApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FoldersApi apiInstance = new FoldersApi();
Long folderId = 789L; // Long | Id of the folder
CreateUpdateFolder updateFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder
try {
apiInstance.updateFolder(folderId, updateFolder);
} catch (ApiException e) {
System.err.println("Exception when calling FoldersApi#updateFolder");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
folderId | Long | Id of the folder | |
updateFolder | CreateUpdateFolder | Name of the folder |
null (empty response body)
- Content-Type: application/json
- Accept: application/json