# contact.updated

Source: https://developer.nylas.com/docs/reference/notifications/contacts/contact-updated/

Sent when a user creates or updates a contact. Most providers don't differentiate between creating and updating contacts.

> This trigger fires for both new contacts and updates to existing contacts because most providers report both as updates.

## data.object fields

- `birthday` (string) - Contact's birthday in YYYY-MM-DD format.
- `company_name` (string) - Name of the contact's company.
- `emails` (array, nullable) - Email addresses associated with the contact. May be `null` if the contact has none.
  - `email` (string) - The email address.
  - `type` (string) (work, home, other) - Category of the email address.
- `given_name` (string) - Contact's first name.
- `grant_id` (string) **(required)** - Unique identifier for the grant that owns this contact.
- `groups` (array, nullable) - Groups the contact belongs to. May be `null` if the contact has none.
  - `id` (string) - Identifier of the contact group.
- `id` (string) **(required)** - Unique identifier for the contact.
- `im_addresses` (array, nullable) - Instant messaging addresses for the contact. May be `null` if the contact has none.
  - `type` (string) - IM service type.
  - `im_address` (string) - The IM address or handle.
- `job_title` (string) - Contact's job title.
- `manager_name` (string) - Name of the contact's manager.
- `middle_name` (string) - Contact's middle name.
- `nickname` (string) - Contact's nickname.
- `notes` (string) - Free-form notes about the contact.
- `office_location` (string) - Contact's office location.
- `object` (string) (contact) - Object type identifier.
- `phone_numbers` (array, nullable) - Phone numbers for the contact. May be `null` if the contact has none.
  - `number` (string) - The phone number.
  - `type` (string) (work, home, mobile, other) - Category of the phone number.
- `physical_addresses` (array, nullable) - Physical addresses for the contact. May be `null` if the contact has none.
  - `city` (string) - City name.
  - `country` (string) - Country name or code.
  - `postal_code` (string) - Postal or ZIP code.
  - `state` (string) - State or province.
  - `street_address` (string) - Street address.
  - `type` (string) (work, home, other) - Category of the address.
- `suffix` (string) - Contact's name suffix (e.g. Jr, Sr, III).
- `surname` (string) - Contact's last name.
- `source` (string) (address_book, inbox, domain) - Source of the contact record.
- `web_pages` (array, nullable) - Web pages associated with the contact. May be `null` if the contact has none.
  - `url` (string) - The URL.
  - `type` (string) (work, home, other) - Category of the web page.

## Example payload

```json
{
  "specversion": "1.0",
  "type": "contact.updated",
  "source": "/google/contact/realtime",
  "id": "<WEBHOOK_ID>",
  "webhook_delivery_attempt": 1,
  "data": {
    "application_id": "<NYLAS_APPLICATION_ID>",
    "object": {
      "birthday": "1988-12-31",
      "company_name": "Nyla Global Express Inc.",
      "emails": [
        {
          "email": "john.schmidt@example.com",
          "type": "work"
        },
        {
          "email": "johnisacoolguy@example.com",
          "type": "home"
        }
      ],
      "given_name": "John",
      "grant_id": "<NYLAS_GRANT_ID>",
      "groups": [
        {
          "id": "friends"
        }
      ],
      "id": "<WEBHOOK_ID>",
      "im_addresses": [
        {
          "type": "jabber",
          "im_address": "myjabberaddress"
        },
        {
          "type": "msn",
          "im_address": "mymsnaddress"
        }
      ],
      "job_title": "Software Engineer",
      "manager_name": "Melissa A. Manager",
      "middle_name": "Jacob",
      "nickname": "JJ",
      "notes": "This is where you'd write something about John.",
      "office_location": "123 Main Street",
      "object": "contact",
      "phone_numbers": [
        {
          "number": "1 123 456 7890",
          "type": "work"
        }
      ],
      "physical_addresses": [
        {
          "city": "San Francisco",
          "country": "USA",
          "postal_code": "94107",
          "state": "CA",
          "street_address": "123 Main Street",
          "type": "work"
        }
      ],
      "suffix": "Jr",
      "surname": "Jingleheimer-Schmidt",
      "source": "address_book",
      "web_pages": [
        {
          "url": "www.myWorkPage.example.com",
          "type": "work"
        }
      ]
    }
  }
}
```
