Skip to content

mailslurp_client.WebhookControllerApi

All URIs are relative to https://python.api.mailslurp.com

Method HTTP request Description
create_account_webhook POST /webhooks Attach a WebHook URL to an inbox
create_webhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
create_webhook_for_phone_number POST /phone/numbers/{phoneNumberId}/webhooks Attach a WebHook URL to a phone number
delete_all_webhooks DELETE /webhooks Delete all webhooks
delete_webhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a Webhook for an Inbox
delete_webhook_by_id DELETE /webhooks/{webhookId} Delete a webhook
get_all_account_webhooks GET /webhooks/account/paginated List account webhooks Paginated
get_all_webhook_results GET /webhooks/results Get results for all webhooks
get_all_webhooks GET /webhooks/paginated List Webhooks Paginated
get_inbox_webhooks_paginated GET /inboxes/{inboxId}/webhooks/paginated Get paginated webhooks for an Inbox
get_json_schema_for_webhook_event POST /webhooks/schema
get_json_schema_for_webhook_payload POST /webhooks/{webhookId}/schema
get_phone_number_webhooks_paginated GET /phone/numbers/{phoneId}/webhooks/paginated Get paginated webhooks for a phone number
get_test_webhook_payload GET /webhooks/test
get_test_webhook_payload_bounce GET /webhooks/test/email-bounce-payload
get_test_webhook_payload_bounce_recipient GET /webhooks/test/email-bounce-recipient-payload
get_test_webhook_payload_delivery_status GET /webhooks/test/delivery-status-payload Get webhook test payload for delivery status event
get_test_webhook_payload_email_opened GET /webhooks/test/email-opened-payload
get_test_webhook_payload_email_read GET /webhooks/test/email-read-payload
get_test_webhook_payload_for_webhook POST /webhooks/{webhookId}/example
get_test_webhook_payload_new_attachment GET /webhooks/test/new-attachment-payload Get webhook test payload for new attachment event
get_test_webhook_payload_new_contact GET /webhooks/test/new-contact-payload Get webhook test payload for new contact event
get_test_webhook_payload_new_email GET /webhooks/test/new-email-payload Get webhook test payload for new email event
get_test_webhook_payload_new_sms GET /webhooks/test/new-sms-payload Get webhook test payload for new sms event
get_webhook GET /webhooks/{webhookId} Get a webhook
get_webhook_result GET /webhooks/results/{webhookResultId} Get a webhook result for a webhook
get_webhook_results GET /webhooks/{webhookId}/results Get a webhook results for a webhook
get_webhook_results_unseen_error_count GET /webhooks/results/unseen-count Get count of unseen webhook results with error status
get_webhooks GET /inboxes/{inboxId}/webhooks Get all webhooks for an Inbox
redrive_webhook_result POST /webhooks/results/{webhookResultId}/redrive Get a webhook result and try to resend the original webhook payload
send_test_data POST /webhooks/{webhookId}/test Send webhook test data
update_webhook_headers PUT /webhooks/{webhookId}/headers Update a webhook request headers
verify_webhook_signature POST /webhooks/verify Verify a webhook payload signature

WebhookDto create_account_webhook(create_webhook_options)

Attach a WebHook URL to an inbox

Get notified of account level events such as bounce and bounce recipient.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    create_webhook_options = mailslurp_client.CreateWebhookOptions() # CreateWebhookOptions | 

    try:
        # Attach a WebHook URL to an inbox
        api_response = api_instance.create_account_webhook(create_webhook_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->create_account_webhook: %sn" % e)

Parameters

Name Type Description Notes
create_webhook_options CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookDto create_webhook(inbox_id, create_webhook_options)

Attach a WebHook URL to an inbox

Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | 
create_webhook_options = mailslurp_client.CreateWebhookOptions() # CreateWebhookOptions | 

    try:
        # Attach a WebHook URL to an inbox
        api_response = api_instance.create_webhook(inbox_id, create_webhook_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->create_webhook: %sn" % e)

Parameters

Name Type Description Notes
inbox_id str
create_webhook_options CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookDto create_webhook_for_phone_number(phone_number_id, create_webhook_options)

Attach a WebHook URL to a phone number

Get notified whenever a phone number receives an SMS via a WebHook URL.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    phone_number_id = 'phone_number_id_example' # str | 
create_webhook_options = mailslurp_client.CreateWebhookOptions() # CreateWebhookOptions | 

    try:
        # Attach a WebHook URL to a phone number
        api_response = api_instance.create_webhook_for_phone_number(phone_number_id, create_webhook_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->create_webhook_for_phone_number: %sn" % e)

Parameters

Name Type Description Notes
phone_number_id str
create_webhook_options CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_all_webhooks(before=before)

Delete all webhooks

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    before = '2013-10-20T19:20:30+01:00' # datetime | before (optional)

    try:
        # Delete all webhooks
        api_instance.delete_all_webhooks(before=before)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->delete_all_webhooks: %sn" % e)

Parameters

Name Type Description Notes
before datetime before [optional]

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No Content -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_webhook(inbox_id, webhook_id)

Delete and disable a Webhook for an Inbox

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | 
webhook_id = 'webhook_id_example' # str | 

    try:
        # Delete and disable a Webhook for an Inbox
        api_instance.delete_webhook(inbox_id, webhook_id)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->delete_webhook: %sn" % e)

Parameters

Name Type Description Notes
inbox_id str
webhook_id str

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No Content -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_webhook_by_id(webhook_id)

Delete a webhook

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | 

    try:
        # Delete a webhook
        api_instance.delete_webhook_by_id(webhook_id)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->delete_webhook_by_id: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageWebhookProjection get_all_account_webhooks(page=page, size=size, sort=sort, event_type=event_type, since=since, before=before)

List account webhooks Paginated

List account webhooks in paginated form. Allows for page , page size, and sort direction.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    page = 0 # int | Optional page  in list pagination (optional) (default to 0)
size = 20 # int | Optional page size for paginated result list. (optional) (default to 20)
sort = 'DESC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'DESC')
event_type = 'event_type_example' # str | Optional event type (optional)
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)

    try:
        # List account webhooks Paginated
        api_response = api_instance.get_all_account_webhooks(page=page, size=size, sort=sort, event_type=event_type, since=since, before=before)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_all_account_webhooks: %sn" % e)

Parameters

Name Type Description Notes
page int Optional page in list pagination [optional] [default to 0]
size int Optional page size for paginated result list. [optional] [default to 20]
sort str Optional createdAt sort direction ASC or DESC [optional] [default to 'DESC']
event_type str Optional event type [optional]
since datetime Filter by created at after the given timestamp [optional]
before datetime Filter by created at before the given timestamp [optional]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageWebhookResult get_all_webhook_results(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only)

Get results for all webhooks

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    page = 0 # int | Optional page  in list pagination (optional) (default to 0)
size = 20 # int | Optional page size in list pagination (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')
search_filter = 'search_filter_example' # str | Optional search filter (optional)
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)
unseen_only = True # bool | Filter for unseen exceptions only (optional)

    try:
        # Get results for all webhooks
        api_response = api_instance.get_all_webhook_results(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_all_webhook_results: %sn" % e)

Parameters

Name Type Description Notes
page int Optional page in list pagination [optional] [default to 0]
size int Optional page size in list pagination [optional] [default to 20]
sort str Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
search_filter str Optional search filter [optional]
since datetime Filter by created at after the given timestamp [optional]
before datetime Filter by created at before the given timestamp [optional]
unseen_only bool Filter for unseen exceptions only [optional]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageWebhookProjection get_all_webhooks(page=page, size=size, sort=sort, search_filter=search_filter, since=since, inbox_id=inbox_id, phone_id=phone_id, before=before)

List Webhooks Paginated

List webhooks in paginated form. Allows for page , page size, and sort direction.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    page = 0 # int | Optional page  in list pagination (optional) (default to 0)
size = 20 # int | Optional page size for paginated result list. (optional) (default to 20)
sort = 'DESC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'DESC')
search_filter = 'search_filter_example' # str | Optional search filter (optional)
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
inbox_id = 'inbox_id_example' # str | Filter by inboxId (optional)
phone_id = 'phone_id_example' # str | Filter by phoneId (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)

    try:
        # List Webhooks Paginated
        api_response = api_instance.get_all_webhooks(page=page, size=size, sort=sort, search_filter=search_filter, since=since, inbox_id=inbox_id, phone_id=phone_id, before=before)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_all_webhooks: %sn" % e)

Parameters

Name Type Description Notes
page int Optional page in list pagination [optional] [default to 0]
size int Optional page size for paginated result list. [optional] [default to 20]
sort str Optional createdAt sort direction ASC or DESC [optional] [default to 'DESC']
search_filter str Optional search filter [optional]
since datetime Filter by created at after the given timestamp [optional]
inbox_id str Filter by inboxId [optional]
phone_id str Filter by phoneId [optional]
before datetime Filter by created at before the given timestamp [optional]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageWebhookProjection get_inbox_webhooks_paginated(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before)

Get paginated webhooks for an Inbox

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | 
page = 0 # int | Optional page  in list pagination (optional) (default to 0)
size = 20 # int | Optional page size in list pagination (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')
search_filter = 'search_filter_example' # str | Optional search filter (optional)
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)

    try:
        # Get paginated webhooks for an Inbox
        api_response = api_instance.get_inbox_webhooks_paginated(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_inbox_webhooks_paginated: %sn" % e)

Parameters

Name Type Description Notes
inbox_id str
page int Optional page in list pagination [optional] [default to 0]
size int Optional page size in list pagination [optional] [default to 20]
sort str Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
search_filter str Optional search filter [optional]
since datetime Filter by created at after the given timestamp [optional]
before datetime Filter by created at before the given timestamp [optional]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

JSONSchemaDto get_json_schema_for_webhook_event(event)

Get JSON Schema definition for webhook payload by event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    event = 'event_example' # str | 

    try:
        api_response = api_instance.get_json_schema_for_webhook_event(event)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_json_schema_for_webhook_event: %sn" % e)

Parameters

Name Type Description Notes
event str

Return type

JSONSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

JSONSchemaDto get_json_schema_for_webhook_payload(webhook_id)

Get JSON Schema definition for webhook payload

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | 

    try:
        api_response = api_instance.get_json_schema_for_webhook_payload(webhook_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_json_schema_for_webhook_payload: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str

Return type

JSONSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageWebhookProjection get_phone_number_webhooks_paginated(phone_id, page=page, size=size, sort=sort, since=since, before=before)

Get paginated webhooks for a phone number

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    phone_id = 'phone_id_example' # str | 
page = 0 # int | Optional page  in list pagination (optional) (default to 0)
size = 20 # int | Optional page size in list pagination (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)

    try:
        # Get paginated webhooks for a phone number
        api_response = api_instance.get_phone_number_webhooks_paginated(phone_id, page=page, size=size, sort=sort, since=since, before=before)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_phone_number_webhooks_paginated: %sn" % e)

Parameters

Name Type Description Notes
phone_id str
page int Optional page in list pagination [optional] [default to 0]
size int Optional page size in list pagination [optional] [default to 20]
sort str Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
since datetime Filter by created at after the given timestamp [optional]
before datetime Filter by created at before the given timestamp [optional]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

AbstractWebhookPayload get_test_webhook_payload(event_name=event_name)

Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    event_name = 'event_name_example' # str |  (optional)

    try:
        api_response = api_instance.get_test_webhook_payload(event_name=event_name)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload: %sn" % e)

Parameters

Name Type Description Notes
event_name str [optional]

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookBouncePayload get_test_webhook_payload_bounce()

Get webhook test payload for bounce

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        api_response = api_instance.get_test_webhook_payload_bounce()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_bounce: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookBouncePayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookBounceRecipientPayload get_test_webhook_payload_bounce_recipient()

Get webhook test payload for bounce recipient

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        api_response = api_instance.get_test_webhook_payload_bounce_recipient()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_bounce_recipient: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookBounceRecipientPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookDeliveryStatusPayload get_test_webhook_payload_delivery_status()

Get webhook test payload for delivery status event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        # Get webhook test payload for delivery status event
        api_response = api_instance.get_test_webhook_payload_delivery_status()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_delivery_status: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookDeliveryStatusPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookEmailOpenedPayload get_test_webhook_payload_email_opened()

Get webhook test payload for email opened event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        api_response = api_instance.get_test_webhook_payload_email_opened()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_email_opened: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookEmailReadPayload get_test_webhook_payload_email_read()

Get webhook test payload for email opened event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        api_response = api_instance.get_test_webhook_payload_email_read()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_email_read: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailReadPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

AbstractWebhookPayload get_test_webhook_payload_for_webhook(webhook_id)

Get example payload for webhook

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | 

    try:
        api_response = api_instance.get_test_webhook_payload_for_webhook(webhook_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_for_webhook: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookNewAttachmentPayload get_test_webhook_payload_new_attachment()

Get webhook test payload for new attachment event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        # Get webhook test payload for new attachment event
        api_response = api_instance.get_test_webhook_payload_new_attachment()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_attachment: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookNewContactPayload get_test_webhook_payload_new_contact()

Get webhook test payload for new contact event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        # Get webhook test payload for new contact event
        api_response = api_instance.get_test_webhook_payload_new_contact()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_contact: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookNewEmailPayload get_test_webhook_payload_new_email()

Get webhook test payload for new email event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        # Get webhook test payload for new email event
        api_response = api_instance.get_test_webhook_payload_new_email()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_email: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookNewSmsPayload get_test_webhook_payload_new_sms()

Get webhook test payload for new sms event

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        # Get webhook test payload for new sms event
        api_response = api_instance.get_test_webhook_payload_new_sms()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_sms: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewSmsPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookDto get_webhook(webhook_id)

Get a webhook

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | 

    try:
        # Get a webhook
        api_response = api_instance.get_webhook(webhook_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_webhook: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookResultDto get_webhook_result(webhook_result_id)

Get a webhook result for a webhook

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_result_id = 'webhook_result_id_example' # str | Webhook Result ID

    try:
        # Get a webhook result for a webhook
        api_response = api_instance.get_webhook_result(webhook_result_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_webhook_result: %sn" % e)

Parameters

Name Type Description Notes
webhook_result_id str Webhook Result ID

Return type

WebhookResultDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

PageWebhookResult get_webhook_results(webhook_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only)

Get a webhook results for a webhook

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | ID of webhook to get results for
page = 0 # int | Optional page  in list pagination (optional) (default to 0)
size = 20 # int | Optional page size in list pagination (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')
search_filter = 'search_filter_example' # str | Optional search filter (optional)
since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional)
before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional)
unseen_only = True # bool | Filter for unseen exceptions only (optional)

    try:
        # Get a webhook results for a webhook
        api_response = api_instance.get_webhook_results(webhook_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_webhook_results: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str ID of webhook to get results for
page int Optional page in list pagination [optional] [default to 0]
size int Optional page size in list pagination [optional] [default to 20]
sort str Optional createdAt sort direction ASC or DESC [optional] [default to 'ASC']
search_filter str Optional search filter [optional]
since datetime Filter by created at after the given timestamp [optional]
before datetime Filter by created at before the given timestamp [optional]
unseen_only bool Filter for unseen exceptions only [optional]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

UnseenErrorCountDto get_webhook_results_unseen_error_count()

Get count of unseen webhook results with error status

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)

    try:
        # Get count of unseen webhook results with error status
        api_response = api_instance.get_webhook_results_unseen_error_count()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_webhook_results_unseen_error_count: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

list[WebhookDto] get_webhooks(inbox_id)

Get all webhooks for an Inbox

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | 

    try:
        # Get all webhooks for an Inbox
        api_response = api_instance.get_webhooks(inbox_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->get_webhooks: %sn" % e)

Parameters

Name Type Description Notes
inbox_id str

Return type

list[WebhookDto]

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookRedriveResult redrive_webhook_result(webhook_result_id)

Get a webhook result and try to resend the original webhook payload

Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_result_id = 'webhook_result_id_example' # str | Webhook Result ID

    try:
        # Get a webhook result and try to resend the original webhook payload
        api_response = api_instance.redrive_webhook_result(webhook_result_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->redrive_webhook_result: %sn" % e)

Parameters

Name Type Description Notes
webhook_result_id str Webhook Result ID

Return type

WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookTestResult send_test_data(webhook_id)

Send webhook test data

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | 

    try:
        # Send webhook test data
        api_response = api_instance.send_test_data(webhook_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->send_test_data: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str

Return type

WebhookTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

WebhookDto update_webhook_headers(webhook_id, webhook_headers)

Update a webhook request headers

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    webhook_id = 'webhook_id_example' # str | 
webhook_headers = mailslurp_client.WebhookHeaders() # WebhookHeaders | 

    try:
        # Update a webhook request headers
        api_response = api_instance.update_webhook_headers(webhook_id, webhook_headers)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->update_webhook_headers: %sn" % e)

Parameters

Name Type Description Notes
webhook_id str
webhook_headers WebhookHeaders

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]

VerifyWebhookSignatureResults verify_webhook_signature(verify_webhook_signature_options)

Verify a webhook payload signature

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://python.api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://python.api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.WebhookControllerApi(api_client)
    verify_webhook_signature_options = mailslurp_client.VerifyWebhookSignatureOptions() # VerifyWebhookSignatureOptions | 

    try:
        # Verify a webhook payload signature
        api_response = api_instance.verify_webhook_signature(verify_webhook_signature_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookControllerApi->verify_webhook_signature: %sn" % e)

Parameters

Name Type Description Notes
verify_webhook_signature_options VerifyWebhookSignatureOptions

Return type

VerifyWebhookSignatureResults

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to ]