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

# account.deactivated

> This event is triggered when an account is deactivated.

<Warning>This event type is in the beta stage; specifications are subject to change at any time.</Warning>

## Event Body Fields

The request event body is a JSON object that contains the following fields:

<ResponseField name="type" type="string">
  `account.deactivated`
</ResponseField>

<ResponseField name="data" type="Object">
  The object containing the event data.

  <Expandable title="data" defaultOpen>
    <ResponseField name="account" type="Account Object">
      The latest data of the deactivated account.

      <Expandable title="account">
        <ResponseField name="id" type="string">
          The permanent ID of the account in ChatBrick.
        </ResponseField>

        <ResponseField name="storeId" type="string">
          ID of the account's primary store. The value will be `null` if the account has no primary store configured
          (e.g., a brand manager's account).
        </ResponseField>

        <ResponseField name="name" type="string">
          Name of the account.

          <Note>
            This is for internal communication purposes; the name should never be displayed in a public customer-facing interface.

            Use `displayName` for referring to the account in a public interface.
          </Note>
        </ResponseField>

        <ResponseField name="displayName" type="string">
          Name of the account for referring in a public interface.
        </ResponseField>

        <ResponseField name="employeeId" type="string">
          The employee ID is configured by the account and is typically mapped to the employee ID in the brand's HR
          system.
        </ResponseField>

        <ResponseField name="avatar" type="string">
          The URL of the account's profile picture (avatar).

          <Warning>
            We don't recommend embedding this image in any webpage because it's not designed for that purpose.

            If you need to display this image on a webpage, please download it when you receive the event and serve it from your own server to ensure it works as expected.
          </Warning>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="timestamps" type="Object">
      Timestamps in **ISO 8601** format.

      <Expandable title="timestamps">
        <ResponseField name="deactivatedAt" type="string">
          The timestamp of when the account was deactivated.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="timestampsMs" type="Object">
      Timestamps are represented in numerical format; the number represents **milliseconds** elapsed since the [epoch](https://en.wikipedia.org/wiki/Unix_time), which is defined as the midnight at the beginning of January 1, 1970, UTC.

      <Expandable title="timestampsMs">
        <ResponseField name="deactivatedAt" type="string">
          The timestamp of when the account was deactivated.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Example theme={null}
  {
    "type": "account.deactivated",
    "data": {
      "account": {
        "id": "clxvu9uj3000001ob92yrb61o",
        "storeId": "clxvu9l6l000001p27bdm9ydk",
        "name": "何沛妮",
        "displayName": "小何 | 台北101旗艦店",
        "employeeId": "50001",
        "avatar": "https://imagedelivery.net/zdm_0V2jGvo4F5LeqaPJDQ/5178a7f8-661f-46d7-d852-0b72a2242100/public"
      },
      "timestamps": {
        "deactivatedAt": "2024-06-18T18:18:18.000Z"
      },
      "timestampsMs": {
        "deactivatedAt": 1718734698000
      }
    }
  }
  ```
</ResponseExample>
