---
title: "Receive custom messages"
method: POST
path: "/channels/{channel_id}/incoming_messages"
tags: ["Messages"]
---

# Receive custom messages

`POST /channels/{channel_id}/incoming_messages`

Receive a custom message in Front. This endpoint is available for custom channels **ONLY**.

Required scope: `messages:write`

## Path parameters

- `channel_id` string, required

## Request body

- CustomMessage
  - `sender` object, required — Data of the sender
    - `contact_id` string — ID of the contact in Front corresponding to the sender
    - `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).
  - `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`.
  - `metadata` object
    - `thread_ref` string — Reference which will be used to thread messages. If omitted, Front threads by sender instead. This reference is unique to custom channels. If you supply a reference generated by another endpoint, the message will not thread into the same conversation.
    - `headers` object — Custom object where any internal information can be stored
  - `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)
