# Create Message Request Payload

> This is a subset of the full specification, limited to the `create_message_request` schema.
>
> You can find the full specification here: /_bundle/docs/references/@2.12/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.12'
  description: This is a subset of the full specification, limited to the `create_message_request` schema.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
paths: {}
components:
  schemas:
    create_message_request:
      description: You can create a message
      type: object
      title: Create Message Request Payload
      nullable: true
      properties:
        message_type:
          type: string
          description: 'The kind of message being created. Values: `in_app` or `email`.'
          enum:
            - in_app
            - email
          example: in_app
        subject:
          type: string
          description: The title of the email.
          example: Thanks for everything
        body:
          type: string
          description: The content of the message. HTML and plaintext are supported.
          example: Hello there
        template:
          type: string
          description: The style of the outgoing message. Possible values `plain` or `personal`.
          example: plain
        from:
          type: object
          description: The sender of the message. If not provided, the default sender will be used.
          properties:
            type:
              type: string
              description: Always `admin`.
              enum:
                - admin
              example: admin
            id:
              type: integer
              description: The identifier for the admin which is given by Intercom.
              example: 394051
          required:
            - type
            - id
        to:
          type: object
          description: The sender of the message. If not provided, the default sender will be used.
          properties:
            type:
              type: string
              description: The role associated to the contact - `user` or `lead`.
              enum:
                - user
                - lead
              example: user
            id:
              type: string
              description: The identifier for the contact which is given by Intercom.
              example: 536e564f316c83104c000020
          required:
            - type
            - id
        created_at:
          type: integer
          description: The time the message was created. If not provided, the current time will be used.
          example: 1590000000
        create_conversation_without_contact_reply:
          type: boolean
          description: Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided.
          default: false
          example: true
      anyOf:
        - title: 'message_type: `email`.'
          required:
            - message_type
            - subject
            - body
            - template
            - from
            - to
        - title: 'message_type: `inapp`.'
          required:
            - message_type
            - body
            - from
            - to
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
