Sending Emails via IS API

Hi There!

I am using the API to send emails. The documentation can be found here:

https://developer.infusionsoft.com/docs/rest/#!/Email/sendEmailUsingPOST

The JSON body I am sending is as follows:

{
“address_field”: “EMAIL1”,
“contacts”: [309],
“plain_content”: “SlVTVCBBIFRFU1Q=”,
“subject”: “Forgot Password”,
“user_id”: 315
}

I get a 202 response back, with an empty body, which I guess is expected. So this appears to be successful. The user I am sending as exists, and the contact I am sending to has been confirmed. However I am getting no emails in my inbox/spam. I am not sure how to check what is happening in InfusionSoft’s backend to see if they processed it, it errored, if its queued, etc?

Any suggestions would greatly help!

Thanks!

Is the sender address (users email address) on a domain you have registered with that domain (ie DKIM, SPF and DMARC) on the domain name server?

Hi John!

Thanks for the reply. The senders address is from the domain we own, so like test@ourdomain.com. The email service is managed through G-Suite and we can send/receive from this email account.

We are getting a 202 back from the API call, which by definition of this code means “accepted for processing”. Although doesn’t necessarily mean it has started processing yet. Is there any way in InfusionSoft where I can see emails that are ‘queued’ or ‘accepted for processing’?

Thanks in advance for your help!

I don’t think they’re is an “emails waiting to be sent” report of any kind…not that I ever recall seeing anyway. 202 is a successful api call for it BUT that just means that IS received the command without event. So next, you’d need to know if in fact that’s what IS sees and then if IS can confirm in their mail logs that it was sent…basically, narrow down where the broken link in the chain is.

I don’t know the status of the email compliance or email support departments because of C19 and I know many of them are working from home for now… @martinc, do you know who/how Ryan can have someone check to see if his API initiated emails sends are doing?

Got it and thanks again. The ‘next link in the chain’ to me would be somewhere within Infusion Soft, as since I got a successful response, the data I sent seems to be valid.

Hopefully someone can direct me to where I can look for this.

Thanks!

I don’t have a test app loaded up with enough emails to cause a backlog, but I believe Marketing > Reports > Email Broadcasts should show it if it’s sticking in the queue. It’s using the same batching as the front-end Broadcasts functionality.

Hi Tom!

Thanks for the reply and info. I can look into the email queue, and I see several ‘weird’ things happening that I can really get no information about. Hopefully you can help out a bit.

Here is what I see:

  1. I just sent an email from a script I created. This is sent from a new user account, and is sent to my contact account. So I should see this in my personal inbox. When I look at the queue with no search criteria (attch 1), I see the email has been sent by the ‘system’ which is weird, because it should be sent by the user we created and specified this user ID in the API call. So that’s one issue.

  2. The status of the email says ‘sent’. However I never received this in my personal inbox. It’s not in my spam folder either. But then the column ‘Sent’ says 0. So not sure why the discrepancy here?

  3. When I actually search for emails sent by the user I sent this latest email by (attach 2), I get 0 results.

  4. When I click on the details for this email (attch 3), under ‘From’ it says ‘The logged-in user’. So this is different than ‘system’ which was stated before. Under ‘To’, it states ‘no receipient search criteria available’, but I sent via an appropriate contact ID. Under ‘status’ it still says ‘sent’, but again never received anything. Then under ‘Emails Skipped’ it states 1.

So this all is REALLY confusing, as the status’s that are reported seem to contradict/conflict with each other all over the place.

It seems the email got in to the queue, and the JSON body I had created was correct. But the emails never were sent, and the report/stats do not really tell me why.

Any way to look into this on your end and find the root cause of the problem? Please let me know what I can do to help as this is a major blocker for us, and the last feature we need done to push our next major release out.

Thanks so much for your help!

@Ryan_White, could you file a support ticket for this via the Developer page (referencing this thread) so our API Support reps can take a look? I can’t actually look at production data, but they should be able to.

https://developer.infusionsoft.com/support/tickets/create/

Yes, I have already filed two. One was closed for some reason, and I filed another one last night:

This references the original ticket, and also this thread.

https://developer.infusionsoft.com/support/tickets/view/?case_id=5003a000011jCrAAAU

I am having what looks like the same issue. Did you ever receive an answer?

Our team is having the same issue.

In case anyone else ends up in this boat:

The documentation is unspecific to the nature of some of the variables:

After submitting a ticket, support helped us with the following problem which looks like it applies to the original poster as well:

the value for the address_field passed in the API request should actually be the field name. Such as ‘Email’, ‘EmailAddress2’, ‘EmailAddress3’ or ‘_CustomFieldName’.

Moreover, the input is case sensitive, so “EMAIL”, or “EMAIL1” as above, will not work and you will not get any feedback.

I asked the support team to ask someone to update the documentation. I thought this was similar to the “fromAddress:” of the XML API. Obviously, that was wrong, and there doesn’t seem to be any way to set the fromAddress: or sender name through the REST API, or from a template. Both features I hope to see in REST v2.

1 Like