Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ It is best effort: characters with no safe equivalent pass through untouched. Ch

### Phone number helpers

textbee does not require international format. Local numbers are sent as written and reach recipients in the same country as the sending SIM. Short codes are sent as written too. They work only in the sending SIM's country, and some work only on one carrier. International format works for every recipient, so use these helpers when you send to more than one country or match replies to stored numbers.

```js
import { isValidE164, normalizePhoneNumber } from '@textbee/sdk'

Expand Down
7 changes: 6 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ export interface SendSmsRequest {
/** The message body. */
message: string

/** Phone numbers to send to, in international format. */
/**
* Phone numbers or short codes. International format (`+12025550123`)
* reaches any country. Local numbers reach recipients in the sending SIM's
* country. Short codes work only in that country, and some only on one
* carrier. Values with letters are rejected with 400.
*/
recipients: string[]

/**
Expand Down
Loading