Create a message

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.

SecurityHTTP: bearerAuth
Request
header Parameters
Intercom-Version
string (intercom_version)
Default: 2.10

Intercom API version.
By default, it's equal to the version set in the app package.

Enum: "1.0" "1.1" "1.2" "1.3" "1.4" "2.0" "2.1" "2.2" "2.3" "2.4" "2.5" "2.6" "2.7" "2.8" "2.9" "2.10" "Unstable"
Example: 2.10
Request Body schema: application/json
Any of:

You can create a message

message_type
required
string

The kind of message being created. Values: in_app or email.

Enum: "in_app" "email"
subject
required
string

The title of the email.

body
required
string

The content of the message. HTML and plaintext are supported.

template
required
string

The style of the outgoing message. Possible values plain or personal.

required
object

The sender of the message. If not provided, the default sender will be used.

required
object

The sender of the message. If not provided, the default sender will be used.

create_conversation_without_contact_reply
boolean
Default: false

Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided.

post
/messages
Request samples
application/json
{ "from": { "type": "user", "id": "65cc94f26abd013b4065cf34" }, "body": "heyy", "referer": "https://twitter.com/bob" }
Responses

200

admin message created

Response Schema: application/json
type
required
string

The type of the message

id
required
string

The id representing the message.

created_at
required
integer <date-time>

The time the conversation was created.

subject
string

The subject of the message. Only present if message_type: email.

body
required
string

The message body, which may contain HTML.

message_type
required
string

The type of message that was sent. Can be email, inapp, facebook or twitter.

Enum: "email" "inapp" "facebook" "twitter"
conversation_id
string

The associated conversation_id

400

No body supplied for email message

401

Unauthorized

403

API plan restricted

422

No subject supplied for email message

Response samples
application/json
{ "type": "user_message", "id": "403919886", "created_at": 1707906290, "body": "heyy", "message_type": "inapp", "conversation_id": "3139" }