# Chat

Source: https://swapcard.dev/analytics-api/export/actions/chat


Find the actions recorded when users chat and take part in video calls, and the fields each one returns.

Each action name below is a value of the `event` field in the [export response](../graphql-analytics-api-export.mdx#example-response). Pass it in the `events` filter to export only that action. **Body** lists the fields of the action's `body` object. Actions labelled **Has recipient** also return the `with_*` fields of the other chat participant.

## Message

<HttpParameters
title="Action"
params={[
  {
    "name": "message_create",
    "type": "string",
    "label": "Has recipient (another chat participant)",
    "description": "When the user sends a message to another participant of the event."
  },
]}
>
</HttpParameters>

<HttpParameters
title="Body"
params={[
  {
    "name": "channel_id",
    "type": "string",
    "description": "The ID of the channel the message belongs to."
  },
]}
>
</HttpParameters>

## Video call

<HttpParameters
title="Action"
params={[
  {
    "name": "video_call_room_end",
    "type": "string",
    "label": "Has recipient (another chat participant)",
    "description": "When a video call room ends."
  },
]}
>
</HttpParameters>

<HttpParameters
title="Body"
params={[
  {
    "name": "duration",
    "type": "int",
    "description": "Duration in milliseconds."
  },
  {
    "name": "participant_count",
    "type": "int",
    "description": "The number of participants during the call."
  },
]}
>
</HttpParameters>
