All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
create_folder | POST /contacts/folders | Create a folder |
delete_folder | DELETE /contacts/folders/{folderId} | Delete a folder (and all its lists) |
get_folder | GET /contacts/folders/{folderId} | Returns folder details |
get_folder_lists | GET /contacts/folders/{folderId}/lists | Get the lists in a folder |
get_folders | GET /contacts/folders | Get all the folders |
update_folder | PUT /contacts/folders/{folderId} | Update a contact folder |
CreateModel create_folder(create_folder)
Create a folder
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::FoldersApi.new
create_folder = SibApiV3Sdk::CreateUpdateFolder.new # CreateUpdateFolder | Name of the folder
begin
#Create a folder
result = api_instance.create_folder(create_folder)
p result
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling FoldersApi->create_folder: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_folder | CreateUpdateFolder | Name of the folder |
- Content-Type: application/json
- Accept: application/json
delete_folder(folder_id)
Delete a folder (and all its lists)
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::FoldersApi.new
folder_id = 789 # Integer | Id of the folder
begin
#Delete a folder (and all its lists)
api_instance.delete_folder(folder_id)
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling FoldersApi->delete_folder: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
folder_id | Integer | Id of the folder |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
GetFolder get_folder(folder_id)
Returns folder details
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::FoldersApi.new
folder_id = 789 # Integer | id of the folder
begin
#Returns folder details
result = api_instance.get_folder(folder_id)
p result
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling FoldersApi->get_folder: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
folder_id | Integer | id of the folder |
- Content-Type: application/json
- Accept: application/json
GetFolderLists get_folder_lists(folder_id, opts)
Get the lists in a folder
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::FoldersApi.new
folder_id = 789 # Integer | Id of the folder
opts = {
limit: 10, # Integer | Number of documents per page
offset: 0 # Integer | Index of the first document of the page
}
begin
#Get the lists in a folder
result = api_instance.get_folder_lists(folder_id, opts)
p result
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling FoldersApi->get_folder_lists: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
folder_id | Integer | Id of the folder | |
limit | Integer | Number of documents per page | [optional] [default to 10] |
offset | Integer | Index of the first document of the page | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
GetFolders get_folders(limit, offset)
Get all the folders
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::FoldersApi.new
limit = 10 # Integer | Number of documents per page
offset = 0 # Integer | Index of the first document of the page
begin
#Get all the folders
result = api_instance.get_folders(limit, offset)
p result
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling FoldersApi->get_folders: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | Number of documents per page | [default to 10] |
offset | Integer | Index of the first document of the page | [default to 0] |
- Content-Type: application/json
- Accept: application/json
update_folder(folder_id, update_folder)
Update a contact folder
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::FoldersApi.new
folder_id = 789 # Integer | Id of the folder
update_folder = SibApiV3Sdk::CreateUpdateFolder.new # CreateUpdateFolder | Name of the folder
begin
#Update a contact folder
api_instance.update_folder(folder_id, update_folder)
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling FoldersApi->update_folder: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
folder_id | Integer | Id of the folder | |
update_folder | CreateUpdateFolder | Name of the folder |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json