{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/frontapp/main/json-schema/frontapp-import-message-schema.json", "title": "ImportMessage", "x-generated": "2026-10-14", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/frontapp-core-api-openapi.yml#/components/schemas/ImportMessage", "required": [ "sender", "to", "body", "external_id", "created_at", "metadata" ], "properties": { "sender": { "type": "object", "description": "Data of the sender", "required": [ "handle" ], "properties": { "author_id": { "type": "string", "description": "ID of the teammate who is the author of the message. Ignored if the message is inbound." }, "name": { "type": "string", "description": "Name of the sender" }, "handle": { "type": "string", "description": "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": { "type": "array", "description": "List of the recipient handles who will receive this message", "items": { "type": "string" } }, "cc": { "type": "array", "description": "List of the recipient handles who will receive a copy of this message", "items": { "type": "string" } }, "bcc": { "type": "array", "description": "List of the recipient handles who will receive a blind copy of this message", "items": { "type": "string" } }, "subject": { "type": "string", "description": "Subject of the message" }, "body": { "type": "string", "description": "Body of the message" }, "body_format": { "type": "string", "description": "Format of the message body. Can be `markdown` (default) or `html`, and can only be specified for `email` type.", "enum": [ "html", "markdown" ], "default": "markdown" }, "external_id": { "type": "string", "description": "External identifier of the message. Front won't import two messages with the same external ID." }, "created_at": { "type": "integer", "description": "Date at which the message as been sent or received." }, "type": { "type": "string", "description": "Type of the message to import. Default is `email`.", "enum": [ "email", "sms", "intercom", "custom" ], "default": "email" }, "assignee_id": { "type": "string", "description": "ID of the teammate who will be assigned to the conversation." }, "tags": { "type": "array", "description": "List of tag names to add to the conversation", "items": { "type": "string" } }, "conversation_id": { "type": "string", "description": "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": { "type": "object", "required": [ "is_inbound" ], "properties": { "thread_ref": { "type": "string", "description": "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": { "type": "boolean", "description": "Determines if message is received (inbound) or sent (outbound) by you." }, "is_archived": { "type": "boolean", "description": "Determines if message is archived after import.", "default": true }, "should_skip_rules": { "type": "boolean", "description": "Determines if rules should be skipped. `true` by default.", "default": true } } }, "attachments": { "description": "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.", "type": "array", "items": { "type": "string", "format": "binary" } } } }