We had a working implementation of sending transactional emails over the HubSpot API though we’re now seeing an issue in which the emails are posted to the API successfully and the response status displays as “PENDING”. The problem is that the emails are never actually delivered and when I check the status of one of these emails using the send status API (https://api.hubapi.com/marketing/v3/email/send-statuses), the response shows the email as “COMPLETE” status and the send result as “VALIDATION_FAILED”. Here is an example:
{
“statusId”: “*******”,
“sendResult”: “VALIDATION_FAILED”,
“requestedAt”: “2023-01-11T23:51:59.343Z”,
“startedAt”: “2023-01-11T23:51:59.860Z”,
“completedAt”: “2023-01-11T23:52:00.001Z”,
“status”: “COMPLETE”,
“eventId”: {
“created”: “2023-01-11T23:51:59.915Z”,
“id”: “***”
}
}
There isn’t a lot of information about that VALIDATION_FAILED send result. The email addresses we’re sending to are valid.
Wondering if it anyone might be able to please point me in the right direction on this?
Hi, @eliotk Thanks for reaching out! One question? Have you filed a HubSpot support ticket for this issue? I ask because accounts that have the transactional email add-on also have access to support. If you already did that and were bounced back here, I apologize. Either way, I am happy to help
This error message and the documentation are a bit vague — “VALIDATION_ERROR” for any errors resulting from invalid data being included in the request.
My suggestion is to share an example request body that threw this error and see if our internal resources can provide some insight into what the root cause is or what is being included that shouldn’t. Aka “can we spot the agitation?”
Thanks Jaycee! This is for a development account of ours that we use for staging that has the transactional api connected so I don’t see the ability to file a support ticket there though we did reach out to our account rep. The odd thing is email was sending a-ok up until recently and it doesn’t look like any of our send handling code had changed.
I’ll work on getting a request body example together and post back here. Thank you!
I’ve obfuscated the auth token, email id and to addresss for privacy though I can assure you those are all valid (also, we encounter this same issue for any to address and any template in our account).
Here’s the response to that with a 200:
{
“statusId”: “***”,
“requestedAt”: “2023-01-12T19:49:38.697Z”,
“status”: “PENDING”
}
Then if we query the send status endpoint using that statusId that comes back with:
As Eliot wrote here already, we also use API to send transactional single-send emails and it is also in our development account. For some reason for a particular contact/email address, we are seeing the error he described. So not all contacts are affected.
I tested with my personal Gmail address and I got the same result. Previously my email address wasn’t in contacts.
When viewing contact activities, I can see an error record:
“There was an issue sending an email to this contact. This email wasn’t sent. Learn more.”
and Learn more link takes me here:
I have gone through this list and I am pretty sure neither of these conditions is met. It must be something else here.
Again, these are API transactional emails, and as such, they shouldn’t require any sending/marketing permissions.
here is anAPI error response:
{
"message": "Email not allowed to be sent to the specified recipient in a sandbox portal",
"status": "error",
"emailAddress": "\*\*\*@\*\*\*.com",
"sendResult": "VALIDATION\_FAILED",
"eventId": {
"id": "\*\*\*",
"created": \*\*\*
}
Wow Igor! Great find bravo! I just confirmed on my end the same behavior that the transactional email does go through if there is a corresponding user in the development account with that email address.
The interesting thing about this though is I’m quite sure that that wasn’t the requirement/expected behavior a week and a half ago. Looking at our past transactional email history, we were able to send these emails to standard contacts with the corresponding account user.
So I wonder if either a) there was a regression that needs to be fixed on the HubSpot side to again be able to send these to standard contacts or b) this is the expected newly implemented behavior?