> ## 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.

# TextMessageInterface

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

# Interface: TextMessageInterface

Represents the interface for a text message.

## Interface

## Extends

* `BaseMessageInterface`

## Properties

### data

> **data**: `object`

The data property of the text message.

#### text

> **text**: `null` | `string`

#### Source

[packages/wapi.js/src/structures/text/interface.ts:14](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/text/interface.ts#L14)

***

### messaging\_product

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

The messaging product.

#### Inherited from

`BaseMessageInterface.messaging_product`

#### Source

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

***

### recipient\_type

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

The recipient type.

#### Inherited from

`BaseMessageInterface.recipient_type`

#### Source

[packages/wapi.js/src/structures/message/interface.ts:22](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/interface.ts#L22)

***

### toJson()

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

Converts the text message to a JSON object that can be sent as a request payload to the WhatsApp Cloud API.

#### Parameters

• **params**

The parameters for converting the text message to JSON.

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

#### Returns

`object`

##### biz\_opaque\_callback\_data?

> `optional` **biz\_opaque\_callback\_data**: `string`

##### context?

> `optional` **context**: `object`

##### context.message\_id

> **message\_id**: `string`

##### messaging\_product

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

##### preview\_url

> **preview\_url**: `boolean`

##### recipient\_type

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

##### text

> **text**: `object`

##### text.body

> **body**: `string`

##### text.preview\_url?

> `optional` **preview\_url**: `boolean`

##### to

> **to**: `string`

##### type

> **type**: `Text`

#### Source

[packages/wapi.js/src/structures/text/interface.ts:21](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/text/interface.ts#L21)

***

### type

> **type**: `MessageTypeEnum`

The type of the message.

#### Inherited from

`BaseMessageInterface.type`

#### Source

[packages/wapi.js/src/structures/message/interface.ts:12](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/interface.ts#L12)
