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
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.AttributesApi();
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
var attributeName = "attributeName_example"; // String | Name of the attribute
var createAttribute = new SibApiV3Sdk.CreateAttribute(); // CreateAttribute | Values to create an attribute
apiInstance.createAttribute(attributeCategory, attributeName, createAttribute).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | |
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
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.AttributesApi();
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
var attributeName = "attributeName_example"; // String | Name of the existing attribute
apiInstance.deleteAttribute(attributeCategory, attributeName).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | |
attributeName | String | Name of the existing attribute |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAttributes getAttributes()
List all attributes
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.AttributesApi();
apiInstance.getAttributes().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
updateAttribute(attributeCategory, attributeName, updateAttribute)
Update contact attribute
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.AttributesApi();
var attributeCategory = "attributeCategory_example"; // String | Category of the attribute
var attributeName = "attributeName_example"; // String | Name of the existing attribute
var updateAttribute = new SibApiV3Sdk.UpdateAttribute(); // UpdateAttribute | Values to update an attribute
apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
attributeCategory | String | Category of the attribute | |
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