> ## Documentation Index
> Fetch the complete documentation index at: https://developer.trychart.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

> Respond to activity that occurs within Chart and third-party providers.

Events represent activity that has occurred within Chart or within third-party tax providers.
Your app can sync the data via either the events API or webhooks.

### Event objects

All event objects share a similar structure.

| Attribute   | Description                                 |
| ----------- | ------------------------------------------- |
| event       | A string that distinguishes the event type. |
| id          | Unique identifier for the event.            |
| data        | Event payload.                              |
| created\_at | Timestamp of when the event occurred.       |

### Taxpayer events

Events emitted when data about a taxpayer changes such as when a taxpayer's status changes,
a taxpayer is disconnected from a provider, or a taxpayer's records are synced.

<AccordionGroup>
  <Accordion title="taxpayer.status_changed">
    ```json Taxpayer status changed event theme={null}
    {
        "event": "taxpayer.status_changed",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "taxpayer_id": "tx_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
            "status": "COMPLETED",
            "status_description": "Taxpayer completed the onboarding process",
            "provider_id": "turbotax"
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="taxpayer.records_synced">
    ```json Taxpayer records synced event theme={null}
    {
        "event": "taxpayer.records_synced",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "taxpayer_id": "tx_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
            "provider_id": "turbotax"
            "records": [
                {
                    "record_id": "record_id",
                    "tax_year": 2021,
                }
            ]
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="taxpayer.disconnected">
    ```json Taxpayer disconnected event theme={null}
    {
        "event": "taxpayer.disconnected",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "taxpayer_id": "tx_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
            "name": "John Doe",
            "provider_id": "turbotax"
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>
</AccordionGroup>

### Widget events

Events emitted when end users (taxpayers) interact with Chart Connect widget.

<AccordionGroup>
  <Accordion title="widget.opened">
    ```json Widget opened event theme={null}
    {
        "event": "widget.opened",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {},
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="widget.closed">
    ```json Widget closed event theme={null}
    {
        "event": "widget.closed",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {},
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="widget.failed">
    ```json Widget failed event theme={null}
    {
        "event": "widget.failed",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "error": {
                "code": "provider_timeout",
                "message": "Provider timed out."
            }
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>
</AccordionGroup>

### Client Link events

Events emitted when end users (taxpayers) interact with the no-code client links.

<AccordionGroup>
  <Accordion title="client_link.opened">
    ```json Client link opened event theme={null}
    {
        "event": "client_link.opened",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "url": "https://dashboard.trychart.com/c/test"
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="client_link.closed">
    ```json Client link closed event theme={null}
    {
        "event": "client_link.closed",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "url": "https://dashboard.trychart.com/c/test"
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="client_link.failed">
    ```json Client link failed event theme={null}
    {
        "event": "client_link.failed",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "error": {
                "code": "provider_timeout",
                "message": "Provider timed out."
            }
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>

  <Accordion title="client_link.succeeded">
    ```json Client link succeeded event theme={null}
    {
        "event": "client_link.succeeded",
        "id": "ev_1bxJqfif_-EJjbl9DNwilJCt5D2tC5Q5",
        "data": {
            "provider_id": "turbotax"
        },
        "created_at": "2021-08-17T03:29:59.397Z"
    }
    ```
  </Accordion>
</AccordionGroup>
