Event types

This is a list of all the types of events we currently send.

We may add more types at any time, so in developing and maintaining your code, you should not assume that only these types exist.

You’ll notice that these events follow a pattern: resource.event. Our goal is to design a consistent system that makes things easier to anticipate and code against.



The event object

The body of each POST request to a webhook endpoint contains an Event Object with the following shape :

FieldDescription
idIdentifier of the event.
created_atDate time that the event was created by Unipile. For events coming from providers, this date can be late by few milliseconds to few seconds compared to the actual date time of occurence.
account_idIdentifier of the account for which the event occurs.
typeType of the event from the list below.
payloadEvent payload, where its shape is an object determined by the type, specified in the list below.


Account events


account.status.disconnected

Occurs when an account is disconnected due to obsolete credentials. Learn more about account status.

FieldDescription
timestampTimestamp of when the account was disconnected
product?If the provider have multiple products with multiple sessions, the disconnected product.

account.status.errored

Occurs when an account becomes out of service due to issues or outages with Unipile, providers, or proxy services. Learn more about account status.

FieldDescription
timestampTimestamp of when the account was out of service
reasonReason of error. Can be unipile, proxy or provider

account.status.running

Occurs when an account connection is started after the account is added, re-authenticated after obsolete credentials, restarted after service interruption or restarted after pause. Learn more about account status.

FieldDescription
timestampTimestamp of when the account was running

account.status.paused

Occurs when an account connection is paused because no subscription is active on your organization. Learn more about account status.

FieldDescription
timestampTimestamp of when the account was paused

account.add

Occurs when a new account is connected. Use account.status.running to make sure the account is ready to be used.

FieldDescription
accountThe linked account. See response of Get an Account for the object shape.
state?State passed to the authentication process

account.reconnect

Occurs when an account is re-authenticated. Use account.status.running to make sure the account is ready to be used.

FieldDescription
accountThe re-authenticated account. See response of Get an Account for the object shape.
state?State passed to the re-authentication process

account.remove

Occurs when an account is removed.

FieldDescription
account.idAccount identifier of the removed account.

account.initial_sync.running

Occurs when the initial sync of an account is started. Learn more about Initial Sync

FieldDescription
timestampTimestamp of when the sync was started.

account.initial_sync.completed

Occurs when the initial sync of an account is finished and all historical data is available. Learn more about Initial Sync

FieldDescription
timestampTimestamp of when the sync was completed.

account.initial_sync.failed

Occurs when the initial sync of an account is stopped due to an error. Learn more about Initial Sync

FieldDescription
timestampTimestamp of when the sync was failed.
reasonReason of error. Can be unipile, proxy or provider



Email events


email.new

Occurs when an email is upserted in a folder:

  • A received email is upserted in the Inbox folder
  • A sent email is upserted in the Outbox (Sent items)
  • An email moved from one folder to another is upserted in the new folder
FieldDescription
folder_idID of the Folder where the email is upserted.
emailUpserted email. See response of Get an Email for the object shape.

email.bounce.new

Occurs when a received Bounced email is upserted in the Inbox folder. This event is emitted instead of email.new and not in addition to.

FieldDescription
reasonReason message
dateDate of the bounce email
addressesComma separated addresses of recipients
typeError type (See Bounce detection guide)
codeError code
emailOriginal email. See response of Get an Email for the object shape.

email.delete

Occurs when an email is deleted from a folder. Note that this event is also triggered when an email is moved from one folder to another as it's deleted from its original folder.

Note that emails client often use the word "delete" to move an email to trash. In this case, email.delete is sent because it's deleted from it's original folder then email.new is sent because it's upserted in the trash folder.

FieldDescription
folder_idID of Folder where the email is deleted.
email.idID of the deleted email.

email.draft.new

Occurs when a new email draft is created.

Payload is an EmailDraft object. See response ofGet a Draft for the object shape.


email.draft.delete

Occurs when an email draft is deleted (not trashed).

FieldDescription
idId of the deleted email draft

email.folder.create

Occurs when a new email folder is created.

Payload is a Folder object. See response ofGet a Folder for the object shape.


email.folder.update

Occurs when an existing email folder is updated.

Payload is the updated Folder object. See response ofGet a Folder for the object shape.


email.folder.delete

Occurs when an existing email folder is deleted.

FieldDescription
idId of the deleted email folder


Messaging events


message.new

Occurs when a new message is upserted (received or sent) in a chat.

Why would I need to receive my sent messages ?

If the message is sent from another device (and not from Unipile), your application might want to be aware of it to stay in sync.

Payload is a Message object. See response ofGet a Message for the object shape.


message.update

Occurs when the content of a message is updated.

Payload is a Message object. See response ofGet a Message for the object shape.


message.delete

Occurs when a message is deleted in a chat.

FieldDescription
chat_idId of the parent chat.
idId of the deleted message.

message.receipt.read

Occurs when a sent message has been read by a user.

FieldDescription
chat_idId of the parent chat.
message_idId of the read message.
user_idId of the user who read the message.
timestampTimestamp of when the message was read.

message.receipt.delivery

Occurs when a sent message has been delivered to a user. If supported by the provider, this event can occurs multiple times for the same message in group chats.

FieldDescription
chat_idId of the parent chat.
message_idId of the delivered message.
user_idId of the user who received the message.
timestampTimestamp of when the message was delivered.

message.reaction.new

Occurs when a new reaction is added to a message.

FieldDescription
chat_idId of the parent chat.
message_idId of the parent message.
reactionThe added reaction. See response of List all Message's Reactions for the object shape.



Calendar events


calendar.create

Occurs when a new calendar is created.

Payload is a Calendar object. See response ofGet a Calendar for the object shape.


calendar.update

Occurs when an existing calendar is updated.

Payload is the updated Calendar object. See response ofGet a Calendar for the object shape.


calendar.delete

Occurs when an existing calendar is deleted.

FieldDescription
idId of the deleted calendar

calendar.event.new

Occurs when a new calendar event is upserted in a Calendar (created or invited to).

Payload is a Calendar Event object. See response ofGet a calendar event for the object shape.


calendar.event.update

Occurs when an existing calendar event is updated.

Payload is the updated Calendar Event object. See response ofGet a calendar event for the object shape.


calendar.event.delete

Occurs when an existing calendar event is deleted.

FieldDescription
calendar_idId of the parent calendar
idId of the deleted event


Tracking events


tracking.click

Occurs when a link is clicked in an email.

FieldDescription
urlURL of the clicked link
ipIP Address of the user who clicked on the link
user_agentUser agent of the browser used by the user to open the link
dateISO Datetime when the link was clicked
label?(Optional) Description label specified in tracking_options when the email was sent using Send an Email.

tracking.open

Occurs when an email is opened by the recipient.

FieldDescription
ipIP Address of the user who opened the mail
user_agentUser agent of the software used by the user to open the email
dateISO Datetime when the email was opened
label?(Optional) Description label specified in tracking_options when the email was sent using Send an Email.


User events


relation.new

Occurs when a new bi-directional relation has been established between the owner of the account and an other user.

Payload is a User Relation object. See response of List Relations of a User for the object shape.


follower.new

Occurs when a user follows the owner of the account.

Payload is a User object. See response of List Followers of a User for the object shape.