The intercom API reference.
The intercom API reference.
Message are how you reach out to contacts in Intercom. They are created when an admin sends an outbound message to a contact.
The type of message that was sent. Can be email, inapp, facebook or twitter.
{ "type": "user_message", "id": "1488971108", "created_at": 1667560812, "subject": "Greetings", "body": "Hello", "message_type": "inapp", "conversation_id": "64619700005570" }
You can create a message that has been initiated by an admin. The conversation can be either an in-app message or an email.
🚧 Sending for visitors
There can be a short delay between when a contact is created and when a contact becomes available to be messaged through the API. A 404 Not Found error will be returned in this case.
This will return the Message model that has been created.
🚧 Retrieving Associated Conversations
As this is a message, there will be no conversation present until the contact responds. Once they do, you will have to search for a contact's conversations with the id of the message.
You can create a message
The kind of message being created. Values: in_app
or email
.
The content of the message. HTML and plaintext are supported.
The style of the outgoing message. Possible values plain
or personal
.
The sender of the message. If not provided, the default sender will be used.
The sender of the message. If not provided, the default sender will be used.
curl -i -X POST \ https://api.intercom.io/messages \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Content-Type: application/json' \ -H 'Intercom-Version: 2.10' \ -d '{ "from": { "type": "user", "id": "6657ad226abd0166b52ae2d9" }, "body": "heyy", "referer": "https://twitter.com/bob" }'
{ "type": "user_message", "id": "403918383", "created_at": 1717021986, "body": "heyy", "message_type": "inapp", "conversation_id": "596" }