Skip to content

Latest commit

 

History

History
168 lines (116 loc) · 5.3 KB

OmnimessageApi.md

File metadata and controls

168 lines (116 loc) · 5.3 KB

messente_api.OmnimessageApi

All URIs are relative to https://api.messente.com/v1

Method HTTP request Description
cancel_scheduled_message DELETE /omnimessage/{omnimessageId} Cancels a scheduled Omnimessage
send_omnimessage POST /omnimessage Sends an Omnimessage

cancel_scheduled_message

object cancel_scheduled_message(omnimessage_id)

Cancels a scheduled Omnimessage

Example

  • Basic Authentication (basicAuth):
import messente_api
from messente_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
    host = "https://api.messente.com/v1"
)

# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = messente_api.OmnimessageApi(api_client)
    omnimessage_id = 'omnimessage_id_example' # str | UUID of the scheduled omnimessage to be cancelled

    try:
        # Cancels a scheduled Omnimessage
        api_response = api_instance.cancel_scheduled_message(omnimessage_id)
        print("The response of OmnimessageApi->cancel_scheduled_message:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OmnimessageApi->cancel_scheduled_message: %s\n" % e)

Parameters

Name Type Description Notes
omnimessage_id str UUID of the scheduled omnimessage to be cancelled

Return type

object

Authorization

basicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
202 Scheduled omnimessage successfully cancelled -
401 Unauthorized -
404 If the omnimessage has already been sent or no such message exists -

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

send_omnimessage

OmniMessageCreateSuccessResponse send_omnimessage(omnimessage)

Sends an Omnimessage

Example

  • Basic Authentication (basicAuth):
import messente_api
from messente_api.models.omni_message_create_success_response import OmniMessageCreateSuccessResponse
from messente_api.models.omnimessage import Omnimessage
from messente_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
    host = "https://api.messente.com/v1"
)

# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = messente_api.OmnimessageApi(api_client)
    omnimessage = messente_api.Omnimessage() # Omnimessage | Omnimessage to be sent

    try:
        # Sends an Omnimessage
        api_response = api_instance.send_omnimessage(omnimessage)
        print("The response of OmnimessageApi->send_omnimessage:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OmnimessageApi->send_omnimessage: %s\n" % e)

Parameters

Name Type Description Notes
omnimessage Omnimessage Omnimessage to be sent

Return type

OmniMessageCreateSuccessResponse

Authorization

basicAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Omnimessage success response -
400 Invalid input -
401 Unauthorized -

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