All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
create_webhook | POST /webhooks | Create a webhook |
delete_webhook | DELETE /webhooks/{webhookId} | Delete a webhook |
get_webhook | GET /webhooks/{webhookId} | Get a webhook details |
get_webhooks | GET /webhooks | Get all webhooks |
update_webhook | PUT /webhooks/{webhookId} | Update a webhook |
CreateModel create_webhook(create_webhook)
Create a webhook
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'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.WebhooksApi(sib_api_v3_sdk.ApiClient(configuration))
create_webhook = sib_api_v3_sdk.CreateWebhook() # CreateWebhook | Values to create a webhook
try:
# Create a webhook
api_response = api_instance.create_webhook(create_webhook)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->create_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_webhook | CreateWebhook | Values to create a webhook |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_webhook(webhook_id)
Delete a webhook
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'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.WebhooksApi(sib_api_v3_sdk.ApiClient(configuration))
webhook_id = 789 # int | Id of the webhook
try:
# Delete a webhook
api_instance.delete_webhook(webhook_id)
except ApiException as e:
print("Exception when calling WebhooksApi->delete_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | int | Id of the webhook |
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]
GetWebhook get_webhook(webhook_id)
Get a webhook details
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'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.WebhooksApi(sib_api_v3_sdk.ApiClient(configuration))
webhook_id = 789 # int | Id of the webhook
try:
# Get a webhook details
api_response = api_instance.get_webhook(webhook_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->get_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | int | Id of the webhook |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetWebhooks get_webhooks(type=type, sort=sort)
Get all webhooks
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'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.WebhooksApi(sib_api_v3_sdk.ApiClient(configuration))
type = 'transactional' # str | Filter on webhook type (optional) (default to transactional)
sort = 'desc' # str | Sort the results in the ascending/descending order of webhook creation (optional) (default to desc)
try:
# Get all webhooks
api_response = api_instance.get_webhooks(type=type, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->get_webhooks: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str | Filter on webhook type | [optional] [default to transactional] |
sort | str | Sort the results in the ascending/descending order of webhook creation | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_webhook(webhook_id, update_webhook)
Update a webhook
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'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.WebhooksApi(sib_api_v3_sdk.ApiClient(configuration))
webhook_id = 789 # int | Id of the webhook
update_webhook = sib_api_v3_sdk.UpdateWebhook() # UpdateWebhook | Values to update a webhook
try:
# Update a webhook
api_instance.update_webhook(webhook_id, update_webhook)
except ApiException as e:
print("Exception when calling WebhooksApi->update_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | int | Id of the webhook | |
update_webhook | UpdateWebhook | Values to update a webhook |
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]