All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
authenticateDomain | PUT /senders/domains/{domainName}/authenticate | Authenticate a domain |
createDomain | POST /senders/domains | Create a new domain |
deleteDomain | DELETE /senders/domains/{domainName} | Delete a domain |
getDomainConfiguration | GET /senders/domains/{domainName} | Validate domain configuration |
getDomains | GET /senders/domains | Get the list of all your domains |
AuthenticateDomainModel authenticateDomain(domainName)
Authenticate a domain
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.DomainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
DomainsApi apiInstance = new DomainsApi();
String domainName = "domainName_example"; // String | Domain name
try {
AuthenticateDomainModel result = apiInstance.authenticateDomain(domainName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#authenticateDomain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
domainName | String | Domain name |
- Content-Type: application/json
- Accept: application/json
CreateDomainModel createDomain(domainName)
Create a new domain
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.DomainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
DomainsApi apiInstance = new DomainsApi();
CreateDomain domainName = new CreateDomain(); // CreateDomain | domain's name
try {
CreateDomainModel result = apiInstance.createDomain(domainName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#createDomain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
domainName | CreateDomain | domain's name | [optional] |
- Content-Type: application/json
- Accept: application/json
deleteDomain(domainName)
Delete a domain
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.DomainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
DomainsApi apiInstance = new DomainsApi();
String domainName = "domainName_example"; // String | Domain name
try {
apiInstance.deleteDomain(domainName);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#deleteDomain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
domainName | String | Domain name |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetDomainConfigurationModel getDomainConfiguration(domainName)
Validate domain configuration
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.DomainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
DomainsApi apiInstance = new DomainsApi();
String domainName = "domainName_example"; // String | Domain name
try {
GetDomainConfigurationModel result = apiInstance.getDomainConfiguration(domainName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#getDomainConfiguration");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
domainName | String | Domain name |
- Content-Type: application/json
- Accept: application/json
GetDomainsList getDomains()
Get the list of all your domains
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.DomainsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
DomainsApi apiInstance = new DomainsApi();
try {
GetDomainsList result = apiInstance.getDomains();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#getDomains");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json