All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
create_attribute | POST /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute |
delete_attribute | DELETE /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute |
get_attributes | GET /contacts/attributes | Lists all attributes |
update_attribute | PUT /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute |
create_attribute(attribute_category, attribute_name, create_attribute)
Creates contact attribute
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::AttributesApi.new
attribute_category = "attribute_category_example" # String | Category of the attribute
attribute_name = "attribute_name_example" # String | Name of the attribute
create_attribute = SibApiV3Sdk::CreateAttribute.new # CreateAttribute | Values to create an attribute
begin
#Creates contact attribute
api_instance.create_attribute(attribute_category, attribute_name, create_attribute)
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling AttributesApi->create_attribute: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | String | Category of the attribute | |
attribute_name | String | Name of the attribute | |
create_attribute | CreateAttribute | Values to create an attribute |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
delete_attribute(attribute_category, attribute_name)
Deletes an attribute
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::AttributesApi.new
attribute_category = "attribute_category_example" # String | Category of the attribute
attribute_name = "attribute_name_example" # String | Name of the existing attribute
begin
#Deletes an attribute
api_instance.delete_attribute(attribute_category, attribute_name)
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling AttributesApi->delete_attribute: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | String | Category of the attribute | |
attribute_name | String | Name of the existing attribute |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAttributes get_attributes
Lists all attributes
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::AttributesApi.new
begin
#Lists all attributes
result = api_instance.get_attributes
p result
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling AttributesApi->get_attributes: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
update_attribute(attribute_category, attribute_name, update_attribute)
Updates contact attribute
# load the gem
require 'sib-api-v3-sdk'
# setup authorization
SibApiV3Sdk.configure do |config|
# Configure API key authorization: api-key
config.api_key['api-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
config.api_key['partner-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['partner-key'] = 'Bearer'
end
api_instance = SibApiV3Sdk::AttributesApi.new
attribute_category = "attribute_category_example" # String | Category of the attribute
attribute_name = "attribute_name_example" # String | Name of the existing attribute
update_attribute = SibApiV3Sdk::UpdateAttribute.new # UpdateAttribute | Values to update an attribute
begin
#Updates contact attribute
api_instance.update_attribute(attribute_category, attribute_name, update_attribute)
rescue SibApiV3Sdk::ApiError => e
puts "Exception when calling AttributesApi->update_attribute: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | String | Category of the attribute | |
attribute_name | String | Name of the existing attribute | |
update_attribute | UpdateAttribute | Values to update an attribute |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json