provider Drafts POST /channels/{channel_id}/drafts
@utdk/front /channels/{channel_id}/drafts
Create draft
Create a draft message which is the first message of a new [conversation](https://dev.frontapp.com/reference/conversations). Required scope: `drafts:write`
channel_id path required
The channel ID. Alternatively, you can supply the channel address as a [resource alias](https://dev.frontapp.com/docs/resource-aliases-1).
string

Try it

Authentication
Configure credentials for Core API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

createDraft
POST/channels/{channel_id}/drafts
Create a draft message which is the first message of a new [conversation](https://dev.frontapp.com/reference/conversations). Required scope: `drafts:write`

Parameters

required

The channel ID. Alternatively, you can supply the channel address as a [resource alias](https://dev.frontapp.com/docs/resource-aliases-1).

Input

ID of the teammate on behalf of whom the draft will be created. Alternatively, you can supply the author ID as a [resource alias](https://dev.frontapp.com/docs/resource-aliases-1). If omitted, will post as the API Token or Application making the request.

List of recipient handles who will receive the message once the draft is sent

List of recipient handles who will receive a copy of the message once the draft is sent

List of the recipient handles who will receive a blind copy of the message once the draft is sent

Subject of the draft.

required

Body of the draft

Body for the quote that the message is referencing. Only available on email channels.

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.

Mode of the draft to create. Can be 'private' (draft is visible to the author only) or 'shared' (draft is visible to all teammates with access to the conversation).

ID of the signature to attach to this draft. If null, no signature is attached.

Whether or not Front should try to resolve a signature for the message. Is ignored if signature_id is included. Default false;

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import front from '@utdk/front';

await front.createDraft({
  "channel_id": "cha_123",
  "mode": "private"
})