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

# Message

> Event payload details and trigger documentation for Message data from Aircall

<img src="https://mintlify.s3.us-west-1.amazonaws.com/morfhealth/images/aircall.svg" alt="images/aircall.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Message event payload from Aircall.

* `Aircall Message Sent`
* `Aircall Message Received`
* `Aircall Message Status Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "body": null,
    "created_at": null,
    "external_number": null,
    "id": "1779973182949pqnihpvazdyw6336",
    "number": {
      "availability_status": "open",
      "country": "US",
      "digits": null,
      "id": 1284757,
      "name": "Support Line",
      "time_zone": "America/Chicago"
    },
    "origin": "native",
    "status": "received"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "body": "Text content of the message",
    "created_at": "ISO 8601 timestamp when the message was created",
    "external_number": "Phone number of the external party (contact)",
    "id": "Unique Aircall message ID",
    "number": {
      "availability_status": "Availability status of the number",
      "country": "Two-letter country code",
      "digits": "Phone number of the Aircall virtual line",
      "id": "Unique Aircall number ID",
      "name": "Display name of the Aircall number",
      "time_zone": "IANA time zone of the Aircall number"
    },
    "origin": "Origin channel of the message",
    "status": "Delivery status of the message"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Message" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      Unique Aircall message ID

      ```json CEL theme={null}
      id
      ```

      ```json Example theme={null}
      "1779973182949pqnihpvazdyw6336"
      ```
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Delivery status of the message

      ```json CEL theme={null}
      status
      ```

      ```json Example theme={null}
      "received"
      ```
    </ResponseField>

    <ResponseField name="body" type="string" required>
      `PII` Text content of the message

      ```json CEL theme={null}
      body
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      ISO 8601 timestamp when the message was created

      ```json CEL theme={null}
      created_at
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="external_number" type="string" required>
      `PII` Phone number of the external party (contact)

      ```json CEL theme={null}
      external_number
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="origin" type="string" required>
      Origin channel of the message

      ```json CEL theme={null}
      origin
      ```

      ```json Example theme={null}
      "native"
      ```
    </ResponseField>

    <ResponseField name="number" type="object" required>
      The Aircall virtual number that sent or received this message

      ```json CEL theme={null}
      number
      ```

      ```json Example theme={null}
      {
      "availability_status": "open",
      "country": "US",
      "digits": null,
      "id": 1284757,
      "name": "Support Line",
      "time_zone": "America/Chicago"
      }
      ```
    </ResponseField>

    <ResponseField name="number.id" type="int64" required>
      Unique Aircall number ID

      ```json CEL theme={null}
      number.id
      ```

      ```json Example theme={null}
      1284757
      ```
    </ResponseField>

    <ResponseField name="number.name" type="string" required>
      Display name of the Aircall number

      ```json CEL theme={null}
      number.name
      ```

      ```json Example theme={null}
      "Support Line"
      ```
    </ResponseField>

    <ResponseField name="number.digits" type="string" required>
      `PII` Phone number of the Aircall virtual line

      ```json CEL theme={null}
      number.digits
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="number.country" type="string" required>
      Two-letter country code

      ```json CEL theme={null}
      number.country
      ```

      ```json Example theme={null}
      "US"
      ```
    </ResponseField>

    <ResponseField name="number.time_zone" type="string" required>
      IANA time zone of the Aircall number

      ```json CEL theme={null}
      number.time_zone
      ```

      ```json Example theme={null}
      "America/Chicago"
      ```
    </ResponseField>

    <ResponseField name="number.availability_status" type="string" required>
      Availability status of the number

      ```json CEL theme={null}
      number.availability_status
      ```

      ```json Example theme={null}
      "open"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
