All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
create_sender | POST /senders | Create a new sender |
delete_sender | DELETE /senders/{senderId} | Delete a sender |
get_ips | GET /senders/ips | Get all the dedicated IPs for your account |
get_ips_from_sender | GET /senders/{senderId}/ips | Get all the dedicated IPs for a sender |
get_senders | GET /senders | Get the list of all your senders |
update_sender | PUT /senders/{senderId} | Update a sender |
validate_sender_by_otp | PUT /senders/{senderId}/validate | Update a sender |
CreateSenderModel create_sender(sender=sender)
Create a new sender
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
sender = brevo_python.CreateSender() # CreateSender | sender's name (optional)
try:
# Create a new sender
api_response = api_instance.create_sender(sender=sender)
pprint(api_response)
except ApiException as e:
print("Exception when calling SendersApi->create_sender: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
sender | CreateSender | sender's name | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_sender(sender_id)
Delete a sender
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
sender_id = 789 # int | Id of the sender
try:
# Delete a sender
api_instance.delete_sender(sender_id)
except ApiException as e:
print("Exception when calling SendersApi->delete_sender: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
sender_id | int | Id of the sender |
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]
GetIps get_ips()
Get all the dedicated IPs for your account
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
try:
# Get all the dedicated IPs for your account
api_response = api_instance.get_ips()
pprint(api_response)
except ApiException as e:
print("Exception when calling SendersApi->get_ips: %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]
GetIpsFromSender get_ips_from_sender(sender_id)
Get all the dedicated IPs for a sender
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
sender_id = 789 # int | Id of the sender
try:
# Get all the dedicated IPs for a sender
api_response = api_instance.get_ips_from_sender(sender_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SendersApi->get_ips_from_sender: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
sender_id | int | Id of the sender |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSendersList get_senders(ip=ip, domain=domain)
Get the list of all your senders
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
ip = 'ip_example' # str | Filter your senders for a specific ip (available for dedicated IP usage only) (optional)
domain = 'domain_example' # str | Filter your senders for a specific domain (optional)
try:
# Get the list of all your senders
api_response = api_instance.get_senders(ip=ip, domain=domain)
pprint(api_response)
except ApiException as e:
print("Exception when calling SendersApi->get_senders: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ip | str | Filter your senders for a specific ip (available for dedicated IP usage only) | [optional] |
domain | str | Filter your senders for a specific domain | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_sender(sender_id, sender=sender)
Update a sender
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
sender_id = 789 # int | Id of the sender
sender = brevo_python.UpdateSender() # UpdateSender | sender's name (optional)
try:
# Update a sender
api_instance.update_sender(sender_id, sender=sender)
except ApiException as e:
print("Exception when calling SendersApi->update_sender: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
sender_id | int | Id of the sender | |
sender | UpdateSender | sender's name | [optional] |
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]
validate_sender_by_otp(sender_id, otp=otp)
Update a sender
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.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 = brevo_python.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 = brevo_python.SendersApi(brevo_python.ApiClient(configuration))
sender_id = 789 # int | Id of the sender
otp = brevo_python.Otp() # Otp | otp (optional)
try:
# Update a sender
api_instance.validate_sender_by_otp(sender_id, otp=otp)
except ApiException as e:
print("Exception when calling SendersApi->validate_sender_by_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
sender_id | int | Id of the sender | |
otp | Otp | otp | [optional] |
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]