Events

An event is created everytime something interesting is happening in Front. You'll find in the table bellow the description of all the types of event that exist:

TypeDescriptionSource TypesTarget Types
assignWhen a conversation is assigned to a teammateteammate or ruleteammate
unassignWhen a conversation is unassignedteammate or rule-
archiveWhen a conversation is archivedteammate or rule-
reopenWhen a conversation is unarchivedteammate or rule-
trashWhen a conversation is deletedteammate or rule-
restoreWhen a conversation is removed from trashteammate or rule-
commentWhen a teammate comments on a conversationteammatecomment
mentionWhen a teammate mention another teammateteammatecomment
inboundWhen an incoming message is receivedinboxesmessage
outboundWhen an outbound message is sentinboxesmessage
moveWhen a conversation is movedteammate or ruleinboxes
forwardWhen a message is forwardedteammate or rulemessage
tagWhen a conversation is taggedteammate or ruletag
untagWhen a conversation is untaggedteammate or ruletag
sending_errorWhen an inbox cannot send a messagerecipientmessage
message_bounce_errorWhen a message cannot be delivered to the recipient.recipientmessage
reminderWhen a conversation is reopen by a reminder--
out_replyWhen a reply is sentinboxesmessage
conversations_mergedWhen two or more conversations are mergedteammatedeleted_conversation_ids

Event Preview

When receiving an event from Front (either via a webhook or via a custom channel callback), you will receive the preview of the event. As the callback URL you provided is public, you should not blindly trust any incoming requests. This is why we're sending only a preview of the event.

An event preview has the exact same structure as the full event except that its source, target and conversation only contain an ID, a link to the resource itself and a type. You can then either request the detailed event or each resources separately by following their respective _links.

Search Parameters

Events support search queries via parameter named q

NameTypeDescription
typesarrayList of the types of events you want to list
beforenumber (optional)Timestamp of the max date of the events you want to list
afternumber (optional)Timestamp of the min date of the events you want to list

Example Event Object

{
  "_links": {
    "self": "https://api2.frontapp.com/events/evt_55c8c149"
  },
  "id": "evt_55c8c149",
  "type": "assign",
  "emitted_at": 1453770984.123,
  "source": {
    "_meta": {
      "type": "rule"
    },
    "data": {
      "_links": {
        "self": "https://api2.frontapp.com/rules/rul_55c8c149",
        "related": {
          "owner": "https://api2.frontapp.com/teams/tim_55c8c149"
        }
      },
      "id": "rul_55c8c149",
      "name": "Important deliveries",
      "actions": [
        "Assign to Leela Turanga"
      ],
      "is_private": false
    }
  },
  "target": {
    "_meta": {
      "type": "teammate"
    },
    "data": {
      "_links": {
        "self": "https://api2.frontapp.com/teammates/tea_55c8c149",
        "related": {
          "inboxes": "https://api2.frontapp.com/teammates/tea_55c8c149/inboxes",
          "conversations": "https://api2.frontapp.com/teammates/tea_55c8c149/conversations"
        }
      },
      "id": "tea_55c8c149",
      "email": "[email protected]",
      "username": "leela",
      "first_name": "Leela",
      "last_name": "Turanga",
      "is_admin": true,
      "is_available": true,
      "is_blocked": false
    }
  },
  "conversation": {
    "_links": {
      "self": "https://api2.frontapp.com/conversations/cnv_55c8c149",
      "related": {
        "events": "https://api2.frontapp.com/conversations/cnv_55c8c149/events",
        "followers": "https://api2.frontapp.com/conversations/cnv_55c8c149/followers",
        "messages": "https://api2.frontapp.com/conversations/cnv_55c8c149/messages",
        "comments": "https://api2.frontapp.com/conversations/cnv_55c8c149/comments",
        "inboxes": "https://api2.frontapp.com/conversations/cnv_55c8c149/inboxes"
      }
    },
    "id": "cnv_55c8c149",
    "subject": "You broke my heart, Hubert.",
    "status": "archived",
    "assignee": {
      "_links": {
        "self": "https://api2.frontapp.com/teammates/tea_55c8c149",
        "related": {
          "inboxes": "https://api2.frontapp.com/teammates/tea_55c8c149/inboxes",
          "conversations": "https://api2.frontapp.com/teammates/tea_55c8c149/conversations"
        }
      },
      "id": "tea_55c8c149",
      "email": "[email protected]",
      "username": "leela",
      "first_name": "Leela",
      "last_name": "Turanga",
      "is_admin": true,
      "is_available": true,
      "is_blocked": false
    },
    "recipient": {
      "_links": {
        "related": {
          "contact": "https://api2.frontapp.com/contacts/crd_55c8c149"
        }
      },
      "handle": "[email protected]",
      "role": "to"
    },
    "tags": [
      {
        "_links": {
          "self": "https://api2.frontapp.com/tags/tag_55c8c149",
          "related": {
            "conversations": "https://api2.frontapp.com/tags/tag_55c8c149/conversations",
            "owner": "https://api2.frontapp.com/teams/tim_55c8c149",
            "children": "https://api2.frontapp.com/tags/tag_55c8c149/children"
          }
        },
        "id": "tag_55c8c149",
        "name": "Robots",
        "highlight": "blue",
        "is_private": false,
        "created_at": 0,
        "updated_at": 0
      }
    ],
    "last_message": {
      "_links": {
        "self": "https://api2.frontapp.com/messages/msg_55c8c149",
        "related": {
          "conversation": "https://api2.frontapp.com/conversations/cnv_55c8c149",
          "message_replied_to": "https://api2.frontapp.com/messages/msg_1ab23cd4"
        }
      },
      "id": "msg_55c8c149",
      "type": "email",
      "is_inbound": true,
      "is_draft": false,
      "created_at": 1453770984.123,
      "blurb": "Anything less than immortality is a...",
      "author": {
        "_links": {
          "self": "https://api2.frontapp.com/teammates/tea_55c8c149",
          "related": {
            "inboxes": "https://api2.frontapp.com/teammates/tea_55c8c149/inboxes",
            "conversations": "https://api2.frontapp.com/teammates/tea_55c8c149/conversations"
          }
        },
        "id": "tea_55c8c149",
        "email": "[email protected]",
        "username": "leela",
        "first_name": "Leela",
        "last_name": "Turanga",
        "is_admin": true,
        "is_available": true,
        "is_blocked": false
      },
      "recipients": [
        {
          "_links": {
            "related": {
              "contact": "https://api2.frontapp.com/contacts/crd_55c8c149"
            }
          },
          "handle": "[email protected]",
          "role": "to"
        }
      ],
      "body": "Anything less than immortality is a complete waste of time.",
      "text": "Anything less than immortality is a complete waste of time.",
      "attachments": [
        {
          "filename": "attachment.jpg",
          "url": "https://api2.frontapp.com/download/fil_55c8c149",
          "content_type": "image/jpeg",
          "size": 10000,
          "metadata": {
            "is_inline": true,
            "cid": "123456789"
          }
        }
      ],
      "metadata": {}
    },
    "created_at": 1453770984.123,
    "is_private": false
  }
}