All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
createEvent | POST /events | Create an event |
createEvent(event)
Create an event
Create an event to track a contact's interaction.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.EventsApi;
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");
EventsApi apiInstance = new EventsApi();
Event event = new Event(); // Event |
try {
apiInstance.createEvent(event);
} catch (ApiException e) {
System.err.println("Exception when calling EventsApi#createEvent");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
event | Event |
null (empty response body)
- Content-Type: application/json
- Accept: application/json