Legacy Mailbox API 1.0 is deprecated

Legacy Mailbox API 1.0 was deprecated on November 20, 2019. Please use Mailbox API 2.0 going forward. If you have any questions or need help with the new API, please reach out.

Thread Object

Field Guide

Name Type Example Notes
id Int 88171881 Unique identifier
assignedTo Person   The Help Scout user assigned to this conversation.
status String active Status of the thread. Possible values include:
  • nochange
  • active
  • pending
  • closed
  • spam
Thread status is only updated when there is a status change. Otherwise, the status will be set to nochange.
createdAt Datetime 2012-07-23T12:34:12Z UTC time when this thread was created.
openedAt Datetime 2012-07-23T03:22:32Z UTC time when this thread was viewed by the customer. Only applies to threads with a 'type' of message.
createdBy Person   The Person who created this thread. The 'type' property will specify whether it was created by a 'user' or a 'customer'.
source Source    
actionType String merged Describes an optional action associated with the line item. Possible values are:
  • movedFromMailbox: The conversation was moved from another mailbox.
  • merged: Another conversation was merged with this conversation.
  • imported: The conversation was imported (no email notifications were sent).
  • workflow: A workflow was run on this conversation (either automatic or manual).
  • importedExternal: The ticket was imported from an external Service.
  • changedTicketCustomer: The customer associated with the ticket was changed.
  • deletedTicket: The ticket was deleted.
  • restoreTicket: The ticket was restored.
actionSourceId Int   Associated with the 'actionType' property.
  • If 'actionType' is 'movedFromMailbox', this will be the id of the mailbox the conversation was moved from.
  • If 'actionType' is 'merged', this will be the id of the original conversation.
  • If 'actionType' is 'imported', this will be null.
  • If 'actionType' is 'workflow', this will be the id of the workflow that was run.
fromMailbox MailboxRef   If the conversation was moved, fromMailbox represents the MailboxRef from which it was moved.
type String message The type of thread. Possible values include:
  • lineitem
  • note
  • message
  • chat
  • customer
  • forwardparent
  • forwardchild
  • phone
  • beaconchat
A lineitem represents a change of state on the conversation. This could include, but not limited to, the conversation was assigned, the status changed, the conversation was moved from one mailbox to another, etc. A line item won't have a body, to/cc/bcc lists, or attachments.

When a conversation is forwarded, a new conversation is created to represent the forwarded conversation.

forwardparent is the type set on the thread of the original conversation that initiated the forward event.

forwardchild is the type set on the first thread of the new forwarded conversation.
state String published The state of the thread. Possible values include:
  • published
  • draft
  • underreview
  • hidden

A state of underreview means the thread has been stopped by Collisino Detection and is waiting to be confirmed (or discarded) by the person that created the thread.

A state of hidden means the thread was hidden (or removed) from customer-facing emails.

customer Person   If thread type is message, this is the customer associated with the conversation. If thread type is customer, this is the the customer who initiated the thread.
body String This is what I have to say. Thank you.  
to Collection   Collection of Strings representing email addresses.
cc Collection   Collection of Strings representing email addresses.
bcc Collection   Collection of Strings representing email addresses.
attachments Collection   Collection of Attachment objects, if attachments exist.
savedReplyId Int 123 ID of Saved reply that was used to create this Thread
createdByCustomer Boolean true Equivalent to
 createdBy.type == 'customer'

Example

{   
    "id": 88171881,
    "assignedTo": {
        "id": 1234,
        "firstName": "Jack",
        "lastName": "Sprout",
        "email": "jack.sprout@gmail.com",
        "phone": null,
        "type": "user"
    },
    "status": "active",
    "createdAt": "2012-07-23T12:34:12Z",
    "openedAt": "2012-07-23T3:23:34Z",
    "createdBy": {
        "id": 1234,
        "firstName": "Jack",
        "lastName": "Sprout",
        "email": "jack.sprout@gmail.com",
        "phone": null,
        "type": "customer"
    },
    "source": {
        "type": "web",
        "via": "user"
    },
    "actionType": "merged",
    "actionSourceId": 135567,
    "type": "message",
    "state": "published",
    "customer": {
        "id": 29418,
        "firstName": "Vernon",
        "lastName": "Bear",
        "email": "vbear@mywork.com",
        "phone": "800-555-1212",
        "type": "customer"
    },
    "fromMailbox": null,
    "body": "This is what I have to say. Thank you.",
    "to": [
        "customer@somewhere.com"
    ],
    "cc": [
        "cc1@somewhere.com",
        "cc2@somewhere.com"
    ]
    "bcc": [
        "bcc1@somewhere.com",
        "bcc2@somewhere.com"
    ],
    "attachments": [{
        "id": 12391,
        "mimeType": "image/jpeg",
        "filename": "logo.jpg",
        "size": 22,
        "width": 160,
        "height": 160,
        "url": "https://secure.helpscout.net/some-url/logo.jpg"
    }],
    savedReplyId: 123,
    createdByCustomer: true
}