import requests

apikey = '"<KEY>"'
url = "https://messagingapis.paylite.net/api/email/send"

payload = '''{ ApiKey:''' + apikey + ''',
    FromEmail: {
        Email: '<EMAIL>',
        Name: 'Stu'
        },
        ToEmail: [
            {
                Email: '<EMAIL>',
                Name: '<NAME>'
            }
        ],
        Subject: 'sand is for...',
        HtmlContent: 'Beaches! I am sending this email from the program I write today!'
    }'''
headers = {'Content-Type': 'application/json'}

print (payload)

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

import requests

apikey = '"<KEY>"'
url = "https://messagingapis.paylite.net/api/email/send"

payload = '''{ ApiKey:''' + apikey + ''',
    FromEmail: {
        Email: '<EMAIL>',
        Name: 'Stu'
        },
        ToEmail: [
            {
                Email: '<EMAIL>',
                Name: '<NAME>'
            }
        ],
        Subject: 'sand is for...',
        HtmlContent: 'Beaches! I am sending this email from the program I write today!'
    }'''
headers = {'Content-Type': 'application/json'}

print (payload)

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

{ ApiKey: ,     FromEmail: {         Email: '<EMAIL>',         Name: 'Stu'         },         ToEmail: [             {                 Email: '<EMAIL>',                 Name: '<NAME>'             }         ],         Subject: 'sand is for...',         HtmlContent: 'Beaches! I am sending this email from the program I write today!'     }