All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
add_contact_to_list | POST /contacts/lists/{listId}/contacts/add | Add existing contacts to a list |
create_attribute | POST /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute |
create_contact | POST /contacts | Create a contact |
create_folder | POST /contacts/folders | Create a folder |
create_list | POST /contacts/lists | Create a list |
delete_attribute | DELETE /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute |
delete_contact | DELETE /contacts/{email} | Deletes a contact |
delete_folder | DELETE /contacts/folders/{folderId} | Delete a folder (and all its lists) |
delete_list | DELETE /contacts/lists/{listId} | Delete a list |
get_attributes | GET /contacts/attributes | Lists all attributes |
get_contact_info | GET /contacts/{email} | Retrieves contact informations |
get_contact_stats | GET /contacts/{email}/campaignStats | Get the campaigns statistics for a contact |
get_contacts | GET /contacts | Get all the contacts |
get_contacts_from_list | GET /contacts/lists/{listId}/contacts | Get the contacts in a list |
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 |
get_list | GET /contacts/lists/{listId} | Get the details of a list |
get_lists | GET /contacts/lists | Get all the lists |
import_contacts | POST /contacts/import | Import contacts |
remove_contact_from_list | POST /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list |
request_contact_export | POST /contacts/export | Export contacts |
update_attribute | PUT /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute |
update_contact | PUT /contacts/{email} | Updates a contact |
update_folder | PUT /contacts/folders/{folderId} | Update a contact folder |
update_list | PUT /contacts/lists/{listId} | Update a list |
PostContactInfo add_contact_to_list(list_id, contact_emails)
Add existing contacts to a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
list_id = 789 # int | Id of the list
contact_emails = sib_api_v3_sdk.AddContactToList() # AddContactToList | Emails addresses of the contacts
try:
# Add existing contacts to a list
api_response = api_instance.add_contact_to_list(list_id, contact_emails)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->add_contact_to_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
list_id | int | Id of the list | |
contact_emails | AddContactToList | Emails addresses of the contacts |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
create_attribute(attribute_category, attribute_name, create_attribute)
Creates contact attribute
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
attribute_category = 'attribute_category_example' # str | Category of the attribute
attribute_name = 'attribute_name_example' # str | Name of the attribute
create_attribute = sib_api_v3_sdk.CreateAttribute() # CreateAttribute | Values to create an attribute
try:
# Creates contact attribute
api_instance.create_attribute(attribute_category, attribute_name, create_attribute)
except ApiException as e:
print("Exception when calling ContactsApi->create_attribute: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | str | Category of the attribute | |
attribute_name | str | Name of the attribute | |
create_attribute | CreateAttribute | Values to create an attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateUpdateContactModel create_contact(create_contact)
Create a contact
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
create_contact = sib_api_v3_sdk.CreateContact() # CreateContact | Values to create a contact
try:
# Create a contact
api_response = api_instance.create_contact(create_contact)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->create_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_contact | CreateContact | Values to create a contact |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateModel create_folder(create_folder)
Create a folder
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
create_folder = sib_api_v3_sdk.CreateUpdateFolder() # CreateUpdateFolder | Name of the folder
try:
# Create a folder
api_response = api_instance.create_folder(create_folder)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->create_folder: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_folder | CreateUpdateFolder | Name of the folder |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateModel create_list(create_list)
Create a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
create_list = sib_api_v3_sdk.CreateList() # CreateList | Values to create a list
try:
# Create a list
api_response = api_instance.create_list(create_list)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->create_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_list | CreateList | Values to create a list |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_attribute(attribute_category, attribute_name)
Deletes an attribute
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
attribute_category = 'attribute_category_example' # str | Category of the attribute
attribute_name = 'attribute_name_example' # str | Name of the existing attribute
try:
# Deletes an attribute
api_instance.delete_attribute(attribute_category, attribute_name)
except ApiException as e:
print("Exception when calling ContactsApi->delete_attribute: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | str | Category of the attribute | |
attribute_name | str | Name of the existing attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_contact(email)
Deletes a contact
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
email = 'email_example' # str | Email (urlencoded) of the contact
try:
# Deletes a contact
api_instance.delete_contact(email)
except ApiException as e:
print("Exception when calling ContactsApi->delete_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
str | Email (urlencoded) of the contact |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_folder(folder_id)
Delete a folder (and all its lists)
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
folder_id = 789 # int | Id of the folder
try:
# Delete a folder (and all its lists)
api_instance.delete_folder(folder_id)
except ApiException as e:
print("Exception when calling ContactsApi->delete_folder: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
folder_id | int | Id of the folder |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_list(list_id)
Delete a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
list_id = 789 # int | Id of the list
try:
# Delete a list
api_instance.delete_list(list_id)
except ApiException as e:
print("Exception when calling ContactsApi->delete_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
list_id | int | Id of the list |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAttributes get_attributes()
Lists all attributes
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
try:
# Lists all attributes
api_response = api_instance.get_attributes()
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_attributes: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetExtendedContactDetails get_contact_info(email)
Retrieves contact informations
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
email = 'email_example' # str | Email (urlencoded) of the contact
try:
# Retrieves contact informations
api_response = api_instance.get_contact_info(email)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_contact_info: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
str | Email (urlencoded) of the contact |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContactCampaignStats get_contact_stats(email)
Get the campaigns statistics for a contact
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
email = 'email_example' # str | Email address (urlencoded) of the contact
try:
# Get the campaigns statistics for a contact
api_response = api_instance.get_contact_stats(email)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_contact_stats: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
str | Email address (urlencoded) of the contact |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContacts get_contacts(limit=limit, offset=offset, modified_since=modified_since)
Get all the contacts
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
limit = 50 # int | Number of documents per page (optional) (default to 50)
offset = 0 # int | Index of the first document of the page (optional) (default to 0)
modified_since = '2013-10-20T19:20:30+01:00' # datetime | 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)
try:
# Get all the contacts
api_response = api_instance.get_contacts(limit=limit, offset=offset, modified_since=modified_since)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_contacts: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Number of documents per page | [optional] [default to 50] |
offset | int | Index of the first document of the page | [optional] [default to 0] |
modified_since | datetime | 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] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContacts get_contacts_from_list(list_id, modified_since=modified_since, limit=limit, offset=offset)
Get the contacts in a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
list_id = 789 # int | Id of the list
modified_since = '2013-10-20T19:20:30+01:00' # datetime | 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 = 50 # int | Number of documents per page (optional) (default to 50)
offset = 0 # int | Index of the first document of the page (optional) (default to 0)
try:
# Get the contacts in a list
api_response = api_instance.get_contacts_from_list(list_id, modified_since=modified_since, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_contacts_from_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
list_id | int | Id of the list | |
modified_since | datetime | 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 | int | Number of documents per page | [optional] [default to 50] |
offset | int | Index of the first document of the page | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFolder get_folder(folder_id)
Returns folder details
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
folder_id = 789 # int | id of the folder
try:
# Returns folder details
api_response = api_instance.get_folder(folder_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_folder: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
folder_id | int | id of the folder |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFolderLists get_folder_lists(folder_id, limit=limit, offset=offset)
Get the lists in a folder
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
folder_id = 789 # int | Id of the folder
limit = 10 # int | Number of documents per page (optional) (default to 10)
offset = 0 # int | Index of the first document of the page (optional) (default to 0)
try:
# Get the lists in a folder
api_response = api_instance.get_folder_lists(folder_id, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_folder_lists: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
folder_id | int | Id of the folder | |
limit | int | Number of documents per page | [optional] [default to 10] |
offset | int | Index of the first document of the page | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFolders get_folders(limit, offset)
Get all the folders
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
limit = 10 # int | Number of documents per page (default to 10)
offset = 0 # int | Index of the first document of the page (default to 0)
try:
# Get all the folders
api_response = api_instance.get_folders(limit, offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_folders: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Number of documents per page | [default to 10] |
offset | int | Index of the first document of the page | [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetExtendedList get_list(list_id)
Get the details of a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
list_id = 789 # int | Id of the list
try:
# Get the details of a list
api_response = api_instance.get_list(list_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
list_id | int | Id of the list |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLists get_lists(limit=limit, offset=offset)
Get all the lists
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
limit = 10 # int | Number of documents per page (optional) (default to 10)
offset = 0 # int | Index of the first document of the page (optional) (default to 0)
try:
# Get all the lists
api_response = api_instance.get_lists(limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_lists: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Number of documents per page | [optional] [default to 10] |
offset | int | Index of the first document of the page | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId import_contacts(request_contact_import)
Import contacts
It returns the background process ID which on completion calls the notify URL that you have set in the input.
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
request_contact_import = sib_api_v3_sdk.RequestContactImport() # RequestContactImport | Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``
try:
# Import contacts
api_response = api_instance.import_contacts(request_contact_import)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->import_contacts: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
request_contact_import | RequestContactImport | Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostContactInfo remove_contact_from_list(list_id, contact_emails)
Remove existing contacts from a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
list_id = 789 # int | Id of the list
contact_emails = sib_api_v3_sdk.RemoveContactFromList() # RemoveContactFromList | Emails adresses of the contact
try:
# Remove existing contacts from a list
api_response = api_instance.remove_contact_from_list(list_id, contact_emails)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->remove_contact_from_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
list_id | int | Id of the list | |
contact_emails | RemoveContactFromList | Emails adresses of the contact |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId request_contact_export(request_contact_export)
Export contacts
It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
request_contact_export = sib_api_v3_sdk.RequestContactExport() # RequestContactExport | Values to request a contact export
try:
# Export contacts
api_response = api_instance.request_contact_export(request_contact_export)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->request_contact_export: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
request_contact_export | RequestContactExport | Values to request a contact export |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_attribute(attribute_category, attribute_name, update_attribute)
Updates contact attribute
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
attribute_category = 'attribute_category_example' # str | Category of the attribute
attribute_name = 'attribute_name_example' # str | Name of the existing attribute
update_attribute = sib_api_v3_sdk.UpdateAttribute() # UpdateAttribute | Values to update an attribute
try:
# Updates contact attribute
api_instance.update_attribute(attribute_category, attribute_name, update_attribute)
except ApiException as e:
print("Exception when calling ContactsApi->update_attribute: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | str | Category of the attribute | |
attribute_name | str | Name of the existing attribute | |
update_attribute | UpdateAttribute | Values to update an attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_contact(email, update_contact)
Updates a contact
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
email = 'email_example' # str | Email (urlencoded) of the contact
update_contact = sib_api_v3_sdk.UpdateContact() # UpdateContact | Values to update a contact
try:
# Updates a contact
api_instance.update_contact(email, update_contact)
except ApiException as e:
print("Exception when calling ContactsApi->update_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
str | Email (urlencoded) of the contact | ||
update_contact | UpdateContact | Values to update a contact |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_folder(folder_id, update_folder)
Update a contact folder
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
folder_id = 789 # int | Id of the folder
update_folder = sib_api_v3_sdk.CreateUpdateFolder() # CreateUpdateFolder | Name of the folder
try:
# Update a contact folder
api_instance.update_folder(folder_id, update_folder)
except ApiException as e:
print("Exception when calling ContactsApi->update_folder: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
folder_id | int | Id of the folder | |
update_folder | CreateUpdateFolder | Name of the folder |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_list(list_id, update_list)
Update a list
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.ContactsApi(sib_api_v3_sdk.ApiClient(configuration))
list_id = 789 # int | Id of the list
update_list = sib_api_v3_sdk.UpdateList() # UpdateList | Values to update a list
try:
# Update a list
api_instance.update_list(list_id, update_list)
except ApiException as e:
print("Exception when calling ContactsApi->update_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
list_id | int | Id of the list | |
update_list | UpdateList | Values to update a list |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]