[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/notifications](../README) / SmsMessage

# Interface: SmsMessage

Defined in: [notifications/src/SmsChannel.ts:18](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/SmsChannel.ts#L18)

Payload returned by notification.toSms().

## Example

```ts
toSms(_notifiable: Notifiable): SmsMessage {
  return { body: `Your verification code is ${this.code}` };
}
```

## Properties

### to?

> `optional` **to?**: `string`

Defined in: [notifications/src/SmsChannel.ts:23](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/SmsChannel.ts#L23)

Recipient phone number in E.164 format, e.g. '+15551234567'. Optional — it
defaults to the notifiable's `phone`, so most notifications omit it.

***

### body

> **body**: `string`

Defined in: [notifications/src/SmsChannel.ts:25](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/SmsChannel.ts#L25)

Message body text.

***

### from?

> `optional` **from?**: `string`

Defined in: [notifications/src/SmsChannel.ts:30](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/SmsChannel.ts#L30)

Sender number or alphanumeric ID.
Overrides the global `from` in config/notifications.ts when set.
