All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
createAttribute | POST /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute |
deleteAttribute | DELETE /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute |
getAttributes | GET /contacts/attributes | List all attributes |
updateAttribute | PUT /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute |
createAttribute(attributeCategory, attributeName, createAttribute)
Create contact attribute
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.AttributesApi;
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");
AttributesApi apiInstance = new AttributesApi();
String attributeCategory = "attributeCategory_example"; // String | Category of the attribute
String attributeName = "attributeName_example"; // String | Name of the attribute
CreateAttribute createAttribute = new CreateAttribute(); // CreateAttribute | Values to create an attribute
try {
apiInstance.createAttribute(attributeCategory, attributeName, createAttribute);
} catch (ApiException e) {
System.err.println("Exception when calling AttributesApi#createAttribute");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | [enum: normal, transactional, category, calculated, global] |
attributeName | String | Name of the attribute | |
createAttribute | CreateAttribute | Values to create an attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteAttribute(attributeCategory, attributeName)
Delete an attribute
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.AttributesApi;
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");
AttributesApi apiInstance = new AttributesApi();
String attributeCategory = "attributeCategory_example"; // String | Category of the attribute
String attributeName = "attributeName_example"; // String | Name of the existing attribute
try {
apiInstance.deleteAttribute(attributeCategory, attributeName);
} catch (ApiException e) {
System.err.println("Exception when calling AttributesApi#deleteAttribute");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | [enum: normal, transactional, category, calculated, global] |
attributeName | String | Name of the existing attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAttributes getAttributes()
List all attributes
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.AttributesApi;
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");
AttributesApi apiInstance = new AttributesApi();
try {
GetAttributes result = apiInstance.getAttributes();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttributesApi#getAttributes");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
updateAttribute(attributeCategory, attributeName, updateAttribute)
Update contact attribute
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.AttributesApi;
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");
AttributesApi apiInstance = new AttributesApi();
String attributeCategory = "attributeCategory_example"; // String | Category of the attribute
String attributeName = "attributeName_example"; // String | Name of the existing attribute
UpdateAttribute updateAttribute = new UpdateAttribute(); // UpdateAttribute | Values to update an attribute
try {
apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute);
} catch (ApiException e) {
System.err.println("Exception when calling AttributesApi#updateAttribute");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | [enum: category, calculated, global] |
attributeName | String | Name of the existing attribute | |
updateAttribute | UpdateAttribute | Values to update an attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json