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
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.AttributesApi(sib_api_v3_sdk.ApiClient(configuration))
attribute_category = 'attribute_category_example' # str | Category of the attribute
attribute_name = 'attribute_name_example' # str | Name of the attribute
create_attribute = sib_api_v3_sdk.CreateAttribute() # CreateAttribute | Values to create an attribute
try:
# Creates contact attribute
api_instance.create_attribute(attribute_category, attribute_name, create_attribute)
except ApiException as e:
print("Exception when calling AttributesApi->create_attribute: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | str | Category of the attribute | |
attribute_name | str | Name of the attribute | |
create_attribute | CreateAttribute | Values to create an attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_attribute(attribute_category, attribute_name)
Deletes an attribute
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.AttributesApi(sib_api_v3_sdk.ApiClient(configuration))
attribute_category = 'attribute_category_example' # str | Category of the attribute
attribute_name = 'attribute_name_example' # str | Name of the existing attribute
try:
# Deletes an attribute
api_instance.delete_attribute(attribute_category, attribute_name)
except ApiException as e:
print("Exception when calling AttributesApi->delete_attribute: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | str | Category of the attribute | |
attribute_name | str | Name of the existing attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAttributes get_attributes()
Lists all attributes
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.AttributesApi(sib_api_v3_sdk.ApiClient(configuration))
try:
# Lists all attributes
api_response = api_instance.get_attributes()
pprint(api_response)
except ApiException as e:
print("Exception when calling AttributesApi->get_attributes: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_attribute(attribute_category, attribute_name, update_attribute)
Updates contact attribute
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.AttributesApi(sib_api_v3_sdk.ApiClient(configuration))
attribute_category = 'attribute_category_example' # str | Category of the attribute
attribute_name = 'attribute_name_example' # str | Name of the existing attribute
update_attribute = sib_api_v3_sdk.UpdateAttribute() # UpdateAttribute | Values to update an attribute
try:
# Updates contact attribute
api_instance.update_attribute(attribute_category, attribute_name, update_attribute)
except ApiException as e:
print("Exception when calling AttributesApi->update_attribute: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
attribute_category | str | Category of the attribute | |
attribute_name | str | Name of the existing attribute | |
update_attribute | UpdateAttribute | Values to update an attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]