Hi there.
I’m on the startup program, but am running into a technical issue. Was advised to create a post here since the startup program does not give me direct access to support.
Essentially, when using the Python SDK, transactional API requests to send emails don’t always populate an email with merge tags that are accessible via attributes that exist on the customer. However, sending the same request through cURL does populate the email with correct merge tags!
Here is sample python code:
from customerio import APIClient, SendEmailRequest, CustomerIOException, Regions
api = APIClient(<API_KEY>, region=Regions.EU)
request = SendEmailRequest(
transactional_message_id="verification-email",
identifiers={
"id": <EMAIL>
},
to=<EMAIL>
)
try:
api.send_email(request)
except CustomerIOException as e:
print("error: ", e)
And sample cURL code:
request='
{
"transactional_message_id": "verification-email",
"identifiers": {
"email": <EMAIL>
},
"to": <EMAIL>
}
'
echo $request | curl -v https://api-eu.customer.io/v1/send/email \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <API_KEY>' \
-d @-
Now I’ve noticed this issue is actually intermittent. Sometimes the SDK is sending the emails with correct merge tags. Other times it isn’t…
This is pretty critical since we’re losing potential customers due to them not receiving a correct verification email!
Is anyone else running into this issue? Or Technical Support -- please advise on how to fix, because this is pretty major