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

# ListInteractionMessage

[Wapi.js Docs](../README.mdx) / ListInteractionMessage

# Class: ListInteractionMessage

Represents a list interaction message.

## Implements

## Extends

* [`InteractiveMessage`](InteractiveMessage.mdx)

## Implements

* [`ListInteractionMessageInterface`](../interfaces/ListInteractionMessageInterface.mdx)

## Constructors

### new ListInteractionMessage()

> **new ListInteractionMessage**(`params`): [`ListInteractionMessage`](ListInteractionMessage.mdx)

Creates an instance of ListInteractionMessage.

#### Parameters

• **params**

The parameters for creating the list interaction message.

• **params.bodyText**: `string`

The body text of the message.

• **params.buttonText**: `string`

The button text of the message.

• **params.footerText?**: `string`

The footer text of the message.

• **params.sections**: `object`\[]

The sections of the message.

#### Returns

[`ListInteractionMessage`](ListInteractionMessage.mdx)

#### Overrides

[`InteractiveMessage`](InteractiveMessage.mdx).[`constructor`](InteractiveMessage.mdx#constructors)

#### Memberof

ListInteractionMessage

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:212](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L212)

## Properties

### data

> **data**: `object`

#### buttonText

> **buttonText**: `string`

#### sections

> **sections**: `object`\[]

#### Implementation of

[`ListInteractionMessageInterface`](../interfaces/ListInteractionMessageInterface.mdx).[`data`](../interfaces/ListInteractionMessageInterface.mdx#data)

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:190](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L190)

***

### interactiveMessageData

> `readonly` **interactiveMessageData**: `object`

#### bodyText

> **bodyText**: `string`

#### footerText?

> `optional` **footerText**: `string`

#### header?

> `optional` **header**: `object` | `object` | `object` | `object`

#### type

> **type**: [`InteractiveMessageTypeEnum`](../enumerations/InteractiveMessageTypeEnum.mdx)

#### Implementation of

[`ListInteractionMessageInterface`](../interfaces/ListInteractionMessageInterface.mdx).[`interactiveMessageData`](../interfaces/ListInteractionMessageInterface.mdx#interactivemessagedata)

#### Inherited from

[`InteractiveMessage`](InteractiveMessage.mdx).[`interactiveMessageData`](InteractiveMessage.mdx#interactivemessagedata)

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:31](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L31)

***

### messaging\_product

> **messaging\_product**: `"whatsapp"`

The messaging product.

#### Implementation of

[`ListInteractionMessageInterface`](../interfaces/ListInteractionMessageInterface.mdx).[`messaging_product`](../interfaces/ListInteractionMessageInterface.mdx#messaging_product)

#### Inherited from

[`InteractiveMessage`](InteractiveMessage.mdx).[`messaging_product`](InteractiveMessage.mdx#messaging_product)

#### Source

[packages/wapi.js/src/structures/message/index.ts:17](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L17)

***

### recipient\_type

> **recipient\_type**: `"individual"`

The recipient type.

#### Implementation of

[`ListInteractionMessageInterface`](../interfaces/ListInteractionMessageInterface.mdx).[`recipient_type`](../interfaces/ListInteractionMessageInterface.mdx#recipient_type)

#### Inherited from

[`InteractiveMessage`](InteractiveMessage.mdx).[`recipient_type`](InteractiveMessage.mdx#recipient_type)

#### Source

[packages/wapi.js/src/structures/message/index.ts:18](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L18)

***

### type

> **type**: `MessageTypeEnum`

The type of the message.

#### Implementation of

[`ListInteractionMessageInterface`](../interfaces/ListInteractionMessageInterface.mdx).[`type`](../interfaces/ListInteractionMessageInterface.mdx#type-1)

#### Inherited from

[`InteractiveMessage`](InteractiveMessage.mdx).[`type`](InteractiveMessage.mdx#type-1)

#### Source

[packages/wapi.js/src/structures/message/index.ts:16](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L16)

## Methods

### addFooter()

> **addFooter**(`footerText`): `void`

Adds a footer to the message.

#### Parameters

• **footerText**: `string`

The footer text to be added.

#### Returns

`void`

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:247](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L247)

***

### addHeader()

> **addHeader**(): `void`

Adds a header to the message.

#### Returns

`void`

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:241](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L241)

***

### addSection()

> **addSection**(`section`): `void`

Adds a section to the message.

#### Parameters

• **section**

The section to be added.

• **section.rows**: `object`\[]= `undefined`

• **section.title**: `string`= `undefined`

#### Returns

`void`

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:234](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L234)

***

### parseConstructorPayload()

> `protected` **parseConstructorPayload**(`schema`, `payload`): `any`

Parses the constructor payload using the provided schema.

#### Parameters

• **schema**: `ZodType`\<`any`, `ZodTypeDef`, `any`>

The Zod schema used for parsing the payload.

• **payload**: `any`

The payload to be parsed.

#### Returns

`any`

The parsed data.

#### Inherited from

[`InteractiveMessage`](InteractiveMessage.mdx).[`parseConstructorPayload`](InteractiveMessage.mdx#parseconstructorpayload)

#### Throws

An error if the parsing fails.

#### Source

[packages/wapi.js/src/structures/message/index.ts:42](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L42)

***

### toJson()

> **toJson**(`params`): `object` & `object`

Converts the message to JSON format.

#### Parameters

• **params**

The parameters for converting the message to JSON.

• **params.replyToMessageId?**: `string`

The ID of the message to reply to.

• **params.to**: `string`

The recipient of the message.

#### Returns

`object` & `object`

The JSON representation of the message.

#### Overrides

[`InteractiveMessage`](InteractiveMessage.mdx).[`toJson`](InteractiveMessage.mdx#tojson)

#### Memberof

ListInteractionMessage

#### Source

[packages/wapi.js/src/structures/interaction/index.ts:259](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/interaction/index.ts#L259)
