v1

latestOpenAPI 3.0.02026-07-26254134307.1 KB
Drafts

Edit draft

Edit a draft message.

Required scope: drafts:write

patch/drafts/{message_id}/

Path parameters

message_idstring required

The draft ID

Request body

author_idstring

ID of the teammate on behalf of whom the draft will be created. Alternatively, you can supply the author ID as a resource alias. If omitted, will post as the API Token or Application making the request.

tostring[]

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

ccstring[]

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

bccstring[]

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

subjectstring

Subject of the draft.

bodystring required

Body of the draft

quote_bodystring

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

attachmentsstring[]

Binary data of attached files. Must use Content-Type: multipart/form-data if specified. See example or read more about Attachments. Max 25 MB.

mode'shared'

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

signature_idstring

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

should_add_default_signatureboolean

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

channel_idstring required

ID of the channel from which the draft will be sent. Alternatively, you can supply the channel address as a resource alias.

versionstring

Version of the draft

Response

A message

idstring

Unique identifier of the message

message_uidstring

Secondary unique identifier of a message. Generated by Front on message creation. Learn more at about the message UID.

type'call' | 'custom' | 'email' | 'facebook' | 'front_chat' | 'googleplay' | 'intercom' | 'internal' | 'phone-call' | 'sms' | 'tweet' | 'tweet_dm' | 'whatsapp' | 'yalo_wha'

Type of the message

is_inboundboolean

Whether or not the message has been received or sent

draft_mode'shared' | 'private' nullable

If the message is a draft, describes the draft mode. Can be 'private' (draft is visible to the author only) or 'shared' (draft is visible to all teammates with access to the conversation).

error_typestring

Type of the error when the draft failed to be sent

versionstring

The current version of the message in Front

created_atnumber

The timestamp when the message was sent or received

subjectstring

Subject of the message

blurbstring

Preview of the message body

bodystring

Body of the message

textstring

Text version of the body for email messages

Example response

{
  "_links": {
    "self": "https://yourCompany.api.frontapp.com/messages/msg_1q15qmtq",
    "related": {
      "conversation": "https://yourCompany.api.frontapp.com/conversations/cnv_yo1kg5q",
      "message_replied_to": "https://yourCompany.api.frontapp.com/messages/msg_2y67qldq",
      "message_seen": "https://yourCompany.api.frontapp.com/messages/msg_1q15qmtq/seen"
    }
  },
  "id": "msg_1q15qmtq",
  "message_uid": "1eab543f84a0785f7b6b8967cck18f4d",
  "type": "email",
  "draft_mode": "shared",
  "version": "551ba368f3e7803cce51503ee3e58ef0-26028-1701804863304-945c",
  "created_at": 1701292639,
  "subject": "Jim's pranks are getting out of hand",
  "blurb": "It's high time we discuss the pranking culture in the office",
  "author": {
    "_links": {
      "self": "https://yourCompany.api.frontapp.com/teammates/tea_6r55a",
      "related": {
        "inboxes": "https://yourCompany.api.frontapp.com/teammates/tea_6r55a/inboxes",
        "conversations": "https://yourCompany.api.frontapp.com/teammates/tea_6r55a/conversations",
        "botSource": "https://yourCompany.api.frontapp.com/rules/rul_6r55a"
      }
    },
    "id": "tea_6r55a",
    "email": "michael.scott@dundermifflin.com",
    "username": "PrisonMike",
    "first_name": "Michael",
    "last_name": "Scott",
    "is_admin": true,
    "custom_fields": {
      "city": "London, UK",
      "isVIP": true,
      "renewal_date": 1525417200,
      "sla_time": 90,
      "owner": "leela@planet-express.com",
      "replyTo": "inb_55c8c149",
      "Job Title": "firefighter"
    }
  },
  "recipients": [
    {
      "_links": {
        "related": {
          "contact": "https://yourCompany.api.frontapp.com/contacts/crd_2njtoem"
        }
      },
      "name": "Phyllis Lapin-Vance",
      "handle": "purpleboss@limitlesspaper.com",
      "role": "cc"
    }
  ],
  "body": "<p>Hi there,</p><p>I wanted to let you know that I'm suggesting an update to <a href='https://dundermifflin.com/privacy/pranks'>Dunder Mifflin's Pranking Policy</a> to provide non-humorous employees greater control over their well-being in the office.</p>",
  "text": "Hi there,\\n\\nI wanted to let you know that I'm suggesting an update to Dunder Mifflin's Pranking Policy (https://dundermifflin.com/privacy/pranks) to provide non-humorous employees greater control over their well-being in the office.",
  "attachments": [
    {
      "id": "fil_3q8a7mby",
      "filename": "Andy_Anger_Management_Certificate.png",
      "url": "https://yourCompany.api.frontapp.com/download/fil_3q8a7mby",
      "content_type": "image/png",
      "size": 4405,
      "metadata": {
        "is_inline": true,
        "cid": "526b45586d0e6b1c484afab63d1ef0be"
      }
    }
  ],
  "signature": {
    "_links": {
      "self": "https://yourCompany.api.frontapp.com/signatures/sig_6rrv2",
      "related": {
        "owner": "https://yourCompany.api.frontapp.com/teams/tim_k30"
      }
    },
    "id": "sig_6rrv2",
    "name": "Finer Things Club signature",
    "body": "<div>—<br />{{user.name}}<br />No paper, no plastic, and no work talk allowed<br /></div>",
    "is_visible_for_all_teammate_channels": true,
    "is_private": true
  },
  "metadata": {
    "intercom_url": "http://intercom.com",
    "duration": 189,
    "external_id": "dkd84992kduo903",
    "twitter_url": "https://twitter.com",
    "is_retweet": true,
    "have_been_retweeted": true,
    "thread_ref": "t0930k9000-394",
    "chat_visitor_url": "https://yourCompany.com/products"
  }
}