---
# System prepended metadata

title: Untitled

---

## Note
**object_id:** `acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014`

### created
**event_id:** `ev_1ctRx2vO2tm7CUfBGgUefu`

```json
{
  "action": "created",
  "api_key_id": null,
  
  "changed_fields": [],
  "data": {
    // probably not relevant, see `object_id`
    "_type": "Note",
    // possibly the same as `date_updated`
    "activity_at": "2020-12-10T12:38:57.753000+00:00",
    "contact_id": null,
    // this is irrelevant, since we'll be storing all events,
    // we can just always use `user_id` (root) or `updated_by`
    "created_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    // probably we don't care about this one?
    "created_by_name": "BI Team",
    // I believe we should be using the ones at the root level,
    // as they're the ones related to the event itself and not the Note object
    "date_created": "2020-12-10T12:38:57.753000+00:00",
    "date_updated": "2020-12-10T12:38:57.753000+00:00",
    // same as `object_id` at the root_level
    "id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
    // same as `lead_id` at the root_level
    "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
    "note": "Ad",
    // probably we don't care about this one?
    "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
    // I'd assume that this would be the same as `user_id` at the root level,
    // couldn't find it anywhere in the docs, needs to be checked.
    "updated_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "updated_by_name": "BI Team",
    // not sure if this is the user that owns the object, regardless this
    // one is most likely irrelevant to us as well
    "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    // most likely irrelevant?
    "user_name": "BI Team",
    // not sure about this one, but would assume it's irrelevant as well
    "users": []
  },
  // when the event object was created and updated in their system, you can see
  // that there's a slight difference from the one in the `data` object
  "date_created": "2020-12-10T12:38:57.755000",
  "date_updated": "2020-12-10T12:38:57.755000",
  "id": "ev_1ctRx2vO2tm7CUfBGgUefu",
  "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
  // irrelevant to us
  "meta": {
    "request_method": "POST",
    "request_path": "/api/v1/activity/note/"
  },
  "object_id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
  "object_type": "activity.note",
  "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
  // we'll most likely never use this object as we're capturing all events,
  // meaning we'll automatically have all previous data
  "previous_data": {},
  // probably not relevant
  "request_id": "req_49Sb7Tvx3JkFBpQzpDNUxi",
  "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT"
}
```

### inserted data
| event        |                                    |
|:-------------|:-----------------------------------|
| id           | "aaaa"                             |
| company-id   | 1                                  |
| created-at   | "2020-12-10T12:39:09.753000+00:00" |
| processed-at | "2020-12-10T12:39:57.753000+00:00" |
| source       | "close"                            |
| user-id      | 1                                  |
| raw-data     | the entire payload                 |

| event_type |                 |
|:-----------|:----------------|
| id         | 1               |
| name       | "activity.note" |

| company                                                                      |
|:------------------------|:---------------------------------------------------|
| id                      | 1                                                  |
| fareharbor-shortname    | null                                               |
| fareharbor-id           | null                                               |
| zendesk-organization-id | null                                               |
| close-lead-id           | "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy" |


| user               |                                                    |
|:-------------------|:---------------------------------------------------|
| id                 | 1                                                  |
| close-user-id      | "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT" |
| zendesk-user-id    | null                                               |
| fareharbor-user-id | null                                                   |


| close_event_note |                                                    |
|:-----------------|:---------------------------------------------------|
| id               | "ev_1ctRx2vO2tm7CUfBGgUefu"                        |
| event-id         | "aaaa"                                             |
| action           | "created"                                          |
| date-created     | "2020-12-10T12:38:57.755000"                       |
| date-updated     | "2020-12-10T12:38:57.755000"                       |
| object-id        | "acti-pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014" |
| note             | "Ad"                                               |



### updated
**event_ids:** [`ev_3EzqYMX9eAHA384DvqT2Ep`, `ev_6eZFeEV6ySDkgjZdnELwXO`]

```json
{
  "action": "updated",
  "api_key_id": null,
  "changed_fields": [
    "date_updated",
    "note"
  ],
  "data": {
    "_type": "Note",
    "activity_at": "2020-12-10T12:38:57.753000+00:00",
    "contact_id": null,
    "created_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "created_by_name": "BI Team",
    "date_created": "2020-12-10T12:38:57.753000+00:00",
    "date_updated": "2020-12-10T12:39:00.365000+00:00",
    "id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
    "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
    "note": "Adding a new note",
    "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
    "updated_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "updated_by_name": "BI Team",
    "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "user_name": "BI Team",
    "users": []
  },
  "date_created": "2020-12-10T12:38:58.999000",
  "date_updated": "2020-12-10T12:39:00.366000",
  "id": "ev_3EzqYMX9eAHA384DvqT2Ep",
  "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
  "meta": {
    "request_method": "PUT",
    "request_path": "/api/v1/activity/note/acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014/"
  },
  "object_id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
  "object_type": "activity.note",
  "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
  "previous_data": {
    "date_updated": "2020-12-10T12:38:57.753000+00:00",
    "note": "Ad"
  },
  "request_id": "req_16Yq1UcXTDG59CyvjSTyB5",
  "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT"
}
```

```json
{
  "action": "updated",
  "api_key_id": null,
  "changed_fields": [
    "date_updated",
    "note"
  ],
  "data": {
    "_type": "Note",
    "activity_at": "2020-12-10T12:38:57.753000+00:00",
    "contact_id": null,
    "created_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "created_by_name": "BI Team",
    "date_created": "2020-12-10T12:38:57.753000+00:00",
    "date_updated": "2020-12-10T13:01:12.775000+00:00",
    "id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
    "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
    "note": "Adding a new note.\nAdd some more info.",
    "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
    "updated_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "updated_by_name": "BI Team",
    "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "user_name": "BI Team",
    "users": []
  },
  "date_created": "2020-12-10T13:01:09.008000",
  "date_updated": "2020-12-10T13:01:12.777000",
  "id": "ev_6eZFeEV6ySDkgjZdnELwXO",
  "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
  "meta": {
    "request_method": "PUT",
    "request_path": "/api/v1/activity/note/acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014/"
  },
  "object_id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
  "object_type": "activity.note",
  "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
  "previous_data": {
    "date_updated": "2020-12-10T12:39:00.365000+00:00",
    "note": "Adding a new note"
  },
  "request_id": "req_4xGCKD21kGeb3hwIBBcG5H",
  "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT"
}
```

### inserted data

| event        |                                    |
|:-------------|:-----------------------------------|
| id           | "bbbb"                             |
| company-id   | 1                                  |
| created-at   | "2020-12-10T12:39:09.753000+00:00" |
| processed-at | "2020-12-10T12:39:57.753000+00:00" |
| source       | "close"                            |
| user-id      | 1                                  |
| raw-data     | the entire payload                 |


| company                                                                      |
|:------------------------|:---------------------------------------------------|
| id                      | 1                                                  |
| fareharbor-shortname    | null                                               |
| fareharbor-id           | null                                               |
| zendesk-organization-id | null                                               |
| close-lead-id           | "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy" |


| user               |                                                    |
|:-------------------|:---------------------------------------------------|
| id                 | 1                                                  |
| close-user-id      | "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT" |
| zendesk-user-id    | null                                               |
| fareharbor-user-id | null                                                   |


| close_event_note |                                                    |
|:-----------------|:---------------------------------------------------|
| id               | "ev_3EzqYMX9eAHA384DvqT2Ep"                        |
| event-id         | "bbbb"                                             |
| action           | "updated"                                          |
| date-created     | "2020-12-10T12:38:58.999000"                       |
| date-updated     | "2020-12-10T12:39:00.366000"                       |
| object-id        | "acti-pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014" |
| note             | "Adding a new note"                                |

### deleted
**event_id:** `ev_6oxpDhRfMdTJDcKVgTw64M`

```json
{
  "action": "deleted",
  "api_key_id": null,
  "changed_fields": [],
  "data": {},
  "date_created": "2020-12-10T13:01:55.107000",
  "date_updated": "2020-12-10T13:01:55.107000",
  "id": "ev_6oxpDhRfMdTJDcKVgTw64M",
  "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
  "meta": {
    "request_method": "DELETE",
    "request_path": "/api/v1/activity/note/acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014/"
  },
  "object_id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
  "object_type": "activity.note",
  "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
  "previous_data": {
    "_type": "Note",
    "activity_at": "2020-12-10T12:38:57.753000+00:00",
    "contact_id": null,
    "created_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "created_by_name": "BI Team",
    "date_created": "2020-12-10T12:38:57.753000+00:00",
    "date_updated": "2020-12-10T13:01:12.775000+00:00",
    "id": "acti_pfPtLLMnQ2XXdbdHzzpSkucgAvPPYhRxgm8n0Nnt014",
    "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
    "note": "Adding a new note.\nAdd some more info.",
    "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
    "updated_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "updated_by_name": "BI Team",
    "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "user_name": "BI Team",
    "users": []
  },
  "request_id": "req_6WGeDSmnVrJ9J8iYrnEmtF",
  "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT"
}
```


## Email
**object_id:** `acti_nOLXUfATaEJGM2OZqxF3bl7GCBx8L7hLxqQl79TGLZ5`

### created
**event_id:** `ev_18Kd6xW93EDCY0O9U7ohyh`

```json
{
  "action": "created",
  "api_key_id": null,
  "changed_fields": [],
  "data": {
    "_type": "Email",
    "activity_at": "2020-12-10T14:11:21.231000+00:00",
    "attachments": [],
    "bcc": [],
    "body_html": "<br>--<br>BI Team",
    "body_preview": "\\--  \nBI Team",
    "body_text": "\\--  \nBI Team",
    "bulk_email_action_id": null,
    "cc": [],
    "contact_id": "cont_NZhmgVsi9AVrbg1Tn5ohw3IfK3OEVK5Y65KHZllgpn0",
    "created_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "created_by_name": "BI Team",
    "date_created": "2020-12-10T14:11:21.231000+00:00",
    "date_scheduled": null,
    "date_sent": null,
    "date_updated": "2020-12-10T14:11:21.240000+00:00",
    "direction": "outgoing",
    "email_account_id": null,
    "envelope": {
      "bcc": [],
      "cc": [],
      "date": null,
      "from": [],
      "in_reply_to": null,
      "is_autoreply": false,
      "message_id": null,
      "reply_to": [],
      "sender": [],
      "subject": "An email subject",
      "to": [
        {
          "email": "charles.moraes@fareharbor.com",
          "name": ""
        }
      ]
    },
    "followup_sequence_delay": null,
    "followup_sequence_id": null,
    "has_reply": false,
    "id": "acti_nOLXUfATaEJGM2OZqxF3bl7GCBx8L7hLxqQl79TGLZ5",
    "in_reply_to_id": null,
    "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
    "message_ids": [],
    "need_smtp_credentials": false,
    "opens": [],
    "opens_summary": null,
    "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
    "references": [],
    "send_as_id": null,
    "send_attempts": [],
    "sender": null,
    "sequence_id": null,
    "sequence_name": null,
    "sequence_subscription_id": null,
    "status": "draft",
    "subject": "An email subject",
    "template_id": null,
    "template_name": null,
    "thread_id": "acti_XAfuXLz3sPVvRg4oCnfW1fAPUffVKTRGM1n5Z52aUdg",
    "to": [
      "charles.moraes@fareharbor.com"
    ],
    "updated_by": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "updated_by_name": "BI Team",
    "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT",
    "user_name": "BI Team",
    "users": []
  },
  "date_created": "2020-12-10T14:11:21.241000",
  "date_updated": "2020-12-10T14:11:21.241000",
  "id": "ev_18Kd6xW93EDCY0O9U7ohyh",
  "lead_id": "lead_Jw5EPR3WqzVXRFnVgl2bfeg1WbtI3IqSaEni0umBEBy",
  "meta": {
    "request_method": "POST",
    "request_path": "/api/v1/activity/email/"
  },
  "object_id": "acti_nOLXUfATaEJGM2OZqxF3bl7GCBx8L7hLxqQl79TGLZ5",
  "object_type": "activity.email",
  "organization_id": "orga_eaQpzoSmatBbEbvFS7F0yA0JNMootYYhEUlPrX4TGmF",
  "previous_data": {},
  "request_id": "req_2w2X4nuDj6ZHa0KXAuGhpe",
  "user_id": "user_DRGwMYWMkwJLy8y1LFlnjfxq0aKphOX3FlsuNWtoKmT"
}
```

### updated
**event_id:** `ev_0qv8ECt76mbh5BY9kKsvrh`

### deleted
**event_id:**

### sent
**event_id:**
