# Updated Element API Documentation (February 2026)

### 🔄 Updated

#### Element API

The Element API documentation has been updated with improved examples, missing type definitions, and clarified transfer parameter documentation to help developers integrate Infinity Elements more effectively.

**What's New:**

* Enhanced `onReceivedFeedMessage()` example showing how to handle complex message structures including rich content arrays and email messages
* Added comprehensive type definitions for `Message`, `FancyMessage`, and related message types
* Clarified transfer parameter documentation for blind transfers, single-step transfers, and consult calls
* Added multiple examples for each transfer type (User, Queue, and Phone Number targets)

| Updated Content                                                                  |
| -------------------------------------------------------------------------------- |
| [Element API](https://developers.avayacloud.com/avaya-infinity/docs/element-api) |

**Key Improvements:**

**Enhanced Message Handling**

The `onReceivedFeedMessage()` example now includes a helper function demonstrating how to extract text from messages with various content types:

* String messages (simple text)
* Rich content arrays (text, images, files, etc.)
* Email messages (with plainText extraction)

This helps developers properly handle the complex `Message` structure returned by the feed message event.

**Complete Type Definitions**

Added missing TypeScript type definitions that were referenced but not documented:

* `Message` interface with all properties including author, channel, message content types, timestamps, and metadata
* `FancyMessage` type alias covering all rich content types (AudioMessage, TextMessage, PreviewMessage, FileMessage, ActionMessage, EmailMessage)

**Clarified Transfer Targets**

Updated documentation for transfer operations to clearly indicate that transfers support three target types:

* **User ID** - Transfer to a specific agent
* **Queue ID** - Transfer to a queue
* **Phone Number** - Transfer to an external number

Affected methods:

* `completeBlindTransfer()`
* `singleStepTransfer()`
* `consultCall()`

Each method now includes examples showing all three transfer target types.