Loading...
Started by Vitalii Chao • Apr 29, 2025 9:31 AM
Total Replies
1
Participants
2
Activity
Quiet
Duration
9:31 AM
Thread starter
import requests
url = "https://api.hubapi.com/marketing/v4/email/single-send"
payload = "{\"customProperties\":{\"customProperty1\":\"value1\",\"customProperty2\":\"value2\"},\"emailId\":189490177320,\"message\":{\"cc\":[\"string\"],\"sendId\":\"string\",\"bcc\":[\"string\"],\"replyTo\":[\"****.com\"],\"from\":\"Test-sender\",\"to\":\"vitaliichao@medirect.com.au\"},\"contactProperties\":{\"lastname\":\"doe\",\"firstname\":\"john\"}}"
headers = {
'accept': "application/json",
'content-type': "application/json",
'authorization': "Bearer pat-na1-*****"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
{"statusId":"HDyC0WDUTSC8IGy8H_UpegAAAZaAcMruAtp3ZA==","requestedAt":"2025-04-29T07:26:38.018Z","status":"PENDING"}