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

# Chat status callback examples

> Chat presence webhook callback examples by status type

## Webhook callback

### Common attributes

<ResponseField name="type" type="string">
  Event type: `PresenceChatCallback`
</ResponseField>

<ResponseField name="phone" type="string">
  Contact phone number
</ResponseField>

<ResponseField name="status" type="string">
  Presence status: `AVAILABLE`, `UNAVAILABLE`, `COMPOSING`, `PAUSED` or `RECORDING`
</ResponseField>

<ResponseField name="lastSeen" type="integer">
  Last seen timestamp (can be null)
</ResponseField>

<ResponseField name="instanceId" type="string">
  Instance identifier
</ResponseField>

***

## Examples by status

<AccordionGroup>
  <Accordion title="Entered chat (AVAILABLE)">
    ```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
    {
      "type": "PresenceChatCallback",
      "phone": "5544999999999",
      "status": "AVAILABLE",
      "lastSeen": null,
      "instanceId": "instance.id"
    }
    ```
  </Accordion>

  <Accordion title="Left chat (UNAVAILABLE)">
    ```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
    {
      "type": "PresenceChatCallback",
      "phone": "5544999999999",
      "status": "UNAVAILABLE",
      "lastSeen": null,
      "instanceId": "instance.id"
    }
    ```
  </Accordion>

  <Accordion title="Typing (COMPOSING)">
    ```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
    {
      "type": "PresenceChatCallback",
      "phone": "5544999999999",
      "status": "COMPOSING",
      "lastSeen": null,
      "instanceId": "instance.id"
    }
    ```
  </Accordion>

  <Accordion title="Stopped typing (PAUSED)">
    ```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
    {
      "type": "PresenceChatCallback",
      "phone": "5544999999999",
      "status": "PAUSED",
      "lastSeen": null,
      "instanceId": "instance.id"
    }
    ```
  </Accordion>

  <Accordion title="Recording audio (RECORDING)">
    ```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
    {
      "type": "PresenceChatCallback",
      "phone": "5544999999999",
      "status": "RECORDING",
      "lastSeen": null,
      "instanceId": "instance.id"
    }
    ```
  </Accordion>
</AccordionGroup>
