Skip to content

Latest commit

 

History

History
293 lines (215 loc) · 9.38 KB

File metadata and controls

293 lines (215 loc) · 9.38 KB

brevo_python.DomainsApi

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

authenticate_domain

AuthenticateDomainModel authenticate_domain(domain_name)

Authenticate a domain

Example

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)

Parameters

Name Type Description Notes
domain_name str Domain name

Return type

AuthenticateDomainModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_domain

CreateDomainModel create_domain(domain_name=domain_name)

Create a new domain

Example

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)

Parameters

Name Type Description Notes
domain_name CreateDomain domain's name [optional]

Return type

CreateDomainModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_domain

delete_domain(domain_name)

Delete a domain

Example

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)

Parameters

Name Type Description Notes
domain_name str Domain name

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_domain_configuration

GetDomainConfigurationModel get_domain_configuration(domain_name)

Validate domain configuration

Example

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)

Parameters

Name Type Description Notes
domain_name str Domain name

Return type

GetDomainConfigurationModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_domains

GetDomainsList get_domains()

Get the list of all your domains

Example

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)

Parameters

This endpoint does not need any parameter.

Return type

GetDomainsList

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]