Skip to main content
Answered

Is there a bug in your message API?

  • February 2, 2023
  • 5 replies
  • 188 views

Hi there,

I am trying to leverage the messages endpoint (https://api.intercom.io/messages and send an email using Intercom, with the template 'plain'. However, it seems like the 'message_type' body parameter is not working, since I send it and it generates an in-app message instead of an email. Here is the body of my request:

{
"message_type": "email",
"subject": "Hey",
"body": "test",
"template": "plain",
"from": {
"type": "user",
"id": "63db09ccde07bab99d849eb0"
},
"to": {
"type": "user",
"id": "630e7f6692c1ab99a7ef98af"
}
}

And here is the response I am getting:

{
"type": "user_message",
"id": "1585218670",
"created_at": 1675374629,
"subject": "Hey",
"body": "test",
"message_type": "email",
"template": "personal",
"conversation_id": "187969400000608"
}

 

No email, but rather an in app message:

 

Screen Shot 2023-02-02 at 1.53.06 PM 

Can you address this? thank you

Best answer by mateusz.leszkiewicz

Hi Richmond, It’s Mat from the Support Engineering Team πŸ˜€

The proper syntax of the email message send API request is like the one below:

 

Please let me know if that was the answer you were looking for 😎

View original
Did this topic help you find an answer to your question?

5 replies

Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • 512 replies
  • February 7, 2023

Hey @user1636​ Racheal from the support engineer team hereπŸ‘‹ 

 

This is actually working as expected, you can see it is sent as an email by the icon here:

Screenshot 2023-02-06 at 7.20.03 PMHowever, your from object should always be from admin not user. We mention this here.

 


  • Author
  • New Participant
  • 1 reply
  • February 10, 2023

@racheal​ thanks for your reply. I do see the icon, yet I am not able to send it in an email. What I want to achieve is to send this message via email so a customer/lead will open it via their email account and not intercom. Similar to how I do it with the 'outbound' section of the product. Is there a way to do it?

 


Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • 512 replies
  • February 17, 2023

Hey @user1636​ 

 

Of course, that is just what this endpoint does! Just as when you send an email from Outbound it still lives in your Intercom platform, so will this email. You will be able to view the email from the user's profile page.

 

The end-user will receive it in their email client. In this example you are sending the email from the end-user, this should always be sent from an admin. Can you give that a try?


I do have the same query. I put the parameter type β€œadmin” on the from object but it says that `invalid parameter`.

I tried different approach we put a message_type of email but the response is always message_type is `inapp`, Yes it is on the profile, but we dont have the email icon that message, also the Leads or User did not actually receives any email coming from the API.

 


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Richmond, It’s Mat from the Support Engineering Team πŸ˜€

The proper syntax of the email message send API request is like the one below:

 

Please let me know if that was the answer you were looking for 😎


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings