All URIs are relative to https://api.mailmojo.no
Method | HTTP request | Description |
---|---|---|
create_webhook | POST /v1/webhooks/ | Create a webhook. |
delete_webhook | DELETE /v1/webhooks/{id}/ | Delete a webhook. |
WebhookCreation create_webhook(webhook)
Create a webhook.
from __future__ import print_function
import time
import mailmojo_sdk
from mailmojo_sdk.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: mailmojo_auth
configuration = mailmojo_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = mailmojo_sdk.WebhookApi(mailmojo_sdk.ApiClient(configuration))
webhook = mailmojo_sdk.WebhookCreation() # WebhookCreation |
try:
# Create a webhook.
api_response = api_instance.create_webhook(webhook)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhookApi->create_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
webhook | WebhookCreation |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_webhook(id)
Delete a webhook.
from __future__ import print_function
import time
import mailmojo_sdk
from mailmojo_sdk.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: mailmojo_auth
configuration = mailmojo_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = mailmojo_sdk.WebhookApi(mailmojo_sdk.ApiClient(configuration))
id = 56 # int | ID of the webhook.
try:
# Delete a webhook.
api_instance.delete_webhook(id)
except ApiException as e:
print("Exception when calling WebhookApi->delete_webhook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
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]