All URIs are relative to https://api.brevo.com/v3
| Method | HTTP request | Description |
|---|---|---|
| authenticate_domain | PUT /senders/domains/{domainName}/authenticate | Authenticate a domain |
| create_domain | POST /senders/domains | Create a new domain |
| delete_domain | DELETE /senders/domains/{domainName} | Delete a domain |
| get_domain_configuration | GET /senders/domains/{domainName} | Validate domain configuration |
| get_domains | GET /senders/domains | Get the list of all your domains |
AuthenticateDomainModel authenticate_domain(domain_name)
Authenticate a domain
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.DomainsApi(brevo_python.ApiClient(configuration))
domain_name = 'domain_name_example' # str | Domain name
try:
# Authenticate a domain
api_response = api_instance.authenticate_domain(domain_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling DomainsApi->authenticate_domain: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| domain_name | str | Domain name |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateDomainModel create_domain(domain_name=domain_name)
Create a new domain
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.DomainsApi(brevo_python.ApiClient(configuration))
domain_name = brevo_python.CreateDomain() # CreateDomain | domain's name (optional)
try:
# Create a new domain
api_response = api_instance.create_domain(domain_name=domain_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling DomainsApi->create_domain: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| domain_name | CreateDomain | domain'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_domain(domain_name)
Delete a domain
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.DomainsApi(brevo_python.ApiClient(configuration))
domain_name = 'domain_name_example' # str | Domain name
try:
# Delete a domain
api_instance.delete_domain(domain_name)
except ApiException as e:
print("Exception when calling DomainsApi->delete_domain: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| domain_name | str | Domain name |
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]
GetDomainConfigurationModel get_domain_configuration(domain_name)
Validate domain configuration
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.DomainsApi(brevo_python.ApiClient(configuration))
domain_name = 'domain_name_example' # str | Domain name
try:
# Validate domain configuration
api_response = api_instance.get_domain_configuration(domain_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling DomainsApi->get_domain_configuration: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| domain_name | str | Domain name |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDomainsList get_domains()
Get the list of all your domains
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.DomainsApi(brevo_python.ApiClient(configuration))
try:
# Get the list of all your domains
api_response = api_instance.get_domains()
pprint(api_response)
except ApiException as e:
print("Exception when calling DomainsApi->get_domains: %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]