Can be used to store all kinds of different behavior events in the Emarsys database.

Attention: This endpoint is part of the Partner API and is therefore specific to certain integrations, not for general use.

Endpoint

POST https://api.emarsys.net/api/hds/events/customers/<customer_id>/events/providers/<provider>/channels/<channel>/campaign_types/<campaign_type>/event_types/<event_type>

URI Examples

  • https://api.emarsys.net/api/hds/events/customers/<customer_id>/events/providers/sendkit/channels/email/campaign_types/txn/event_types/bounce
  • https://api.emarsys.net/api/hds/events/customers/<customer_id>/events/providers/sendkit/channels/email/campaign_types/txn/event_types/open
  • https://api.emarsys.net/api/hds/events/customers/<customer_id>/events/providers/sendkit/channels/email/campaign_types/txn/event_types/click
  • https://api.emarsys.net/api/hds/events/customers/<customer_id>/events/providers/sendkit/channels/email/campaign_types/txn/event_types/send
  • https://api.emarsys.net/api/hds/events/customers/<customer_id>/events/providers/sendkit/channels/email/campaign_types/txn/event_types/unsubscribe

CSV Examples

Bounce

campaign_id,message_id,contact_id,event_time,bounce_category
111111111,222222222,313131313,2015-08-02 14:32:23,hard
222222222,454545454,333333333,2015-09-29 11:30:01,soft

Open

campaign_id,message_id,contact_id,event_time,link_id,is_mobile,platform
111111111,222222222,313131313,2015-08-02 14:32:23,333333333,true,iPhone
222222222,454545454,333333333,2015-09-29 11:30:01,444444444,false,Android

Click

campaign_id,message_id,contact_id,event_time,link_id,is_mobile,platform
111111111,222222222,313131313,2015-08-02 14:32:23,333333333,true,iPhone
222222222,454545454,333333333,2015-09-29 11:30:01,444444444,false,Android

Send

campaign_id,message_id,contact_id,event_time,sending_segment_id
111111111,222222222,313131313,2015-08-02 14:32:23,333333333
222222222,454545454,333333333,2015-09-29 11:30:01,444444444

Unsubscribe

campaign_id,message_id,contact_id,event_time,field_id
111111111,222222222,313131313,2015-08-02 14:32:23,333333333
222222222,454545454,333333333,2015-09-29 11:30:01,444444444

Parameters

Name Type Description Comments
customer_id int Emarsys customer ID, part of the URI.
provider string Source that provides the events, e.g. suitenative, suitekit; part of the URI.
channel string Medium used to deliver the message, e.g. email, sms, push; part of the URI.
campaign type string Classifies campaigns into transactional, ad hoc or recurring categories; used for reporting and segmentation, e.g. txn, adhoc, recurring, part of the URI.
event_type string Events with the same type must have the same set of attributes, e.g.: send, open, click, bounce, unsubscribe; part of the URI.
campaign_id int ID that groups messages into meaningful categories for segmentation or reporting, such as an email_id, or a Suitekit stream_id. Must be unique per customer.
contact_id int Internal ID of a contact in Emarsys.
event_time date ISO 8601 date format is recognized. Time and time zone offset are optional. If there is no offset, Vienna time is assumed.
message_id int Used to create a connection between different events related to a single message within the scope of a campaign. It is needed to connect events of different types to the original message that was sent to the contact. For example, if a contact can receive the same email campaign twice, we need to be able to tell if an open event comes from the first or second email. In Emarsys, this would be the launch list ID.

Result Example

{
  "replyCode": 0,
  "replyText": "OK"
}

Errors

HTTP Code Reply Code Message Description
400 1 Cannot parse CSV payload. Illegal quoting in line 1.
400 2 Missing required field: event_time, event number: 0.
400 3 Invalid value for field campaign_id: Integer value expected, event number: 0.