---
title: "Import message"
method: POST
path: "/inboxes/{inbox_id}/imported_messages"
tags: ["Messages"]
---

# Import message

`POST /inboxes/{inbox_id}/imported_messages`

Use this endpoint to import conversations into Front without sending data through a channel. Typical use cases include importing historical conversations or creating new conversations from non-standard sources, such as web form submissions that can't use the default Form channel (for example, forms that don't have static URLs or form providers that send email notifications after submission). Avoid using this endpoint for conversations that can be handled by a dedicated Front channel—instead, use the [Create message](https://dev.frontapp.com/reference/create-message) endpoint to send (rather than import) a new message.

Required scope: `messages:write`

## Path parameters

- `inbox_id` string, required

## Request body

- ImportMessage
  - `sender` object, required — Data of the sender
    - `author_id` string — ID of the teammate who is the author of the message. Ignored if the message is inbound.
    - `name` string — Name of the sender
    - `handle` string, required — Handle of the sender. It can be any string used to uniquely identify the sender. **Important:** When sending a phone number, include a country code preceded by a plus (+) sign. For example, +33 for France. If you do not send a country code or include a plus sign, Front will normalize your phone number to the USA (+1).
  - `to` string[], required — List of the recipient handles who will receive this message
  - `cc` string[] — List of the recipient handles who will receive a copy of this message
  - `bcc` string[] — List of the recipient handles who will receive a blind copy of this message
  - `subject` string — Subject of the message
  - `body` string, required — Body of the message
  - `body_format` 'html' | 'markdown' — Format of the message body. Can be `markdown` (default) or `html`, and can only be specified for `email` type.
  - `external_id` string, required — External identifier of the message. Front won't import two messages with the same external ID.
  - `created_at` integer, required — Date at which the message as been sent or received.
  - `type` 'email' | 'sms' | 'intercom' | 'custom' — Type of the message to import. Default is `email`.
  - `assignee_id` string — ID of the teammate who will be assigned to the conversation.
  - `tags` string[] — List of tag names to add to the conversation
  - `conversation_id` string — If supplied, Front will thread this message into conversation with the given ID. Note that including this parameter nullifies the `thread_ref` parameter _completely_.
  - `metadata` object, required
    - `thread_ref` string — Reference which will be used to thread messages. If omitted, Front threads by sender instead. This reference is unique to importing historical messages. If you supply a reference generated by another endpoint, the message will not thread into the same conversation.
    - `is_inbound` boolean, required — Determines if message is received (inbound) or sent (outbound) by you.
    - `is_archived` boolean — Determines if message is archived after import.
    - `should_skip_rules` boolean — Determines if rules should be skipped. `true` by default.
  - `attachments` string[] — Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb) or read more about [Attachments](https://dev.frontapp.com/docs/attachments-1). Max 25 MB.

## Response `202`

An accepted message

- object
  - `status` string
  - `message_uid` string — Message unique identifier

---

[API](https://skmtc.dev/frontapp/apis/core-api.md) · [All operations](https://skmtc.dev/frontapp/apis/core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/frontapp/core-api/revisions/76d1eaa2d0eb/schema)
