# Message

## Send an SMS message

`spoke://message/sms?contactAddress={contactAddress}&companyAddress={companyAddress}&body={body}`

Starts or continues an SMS conversation using the given `companyAddress` as the sender ID and prefills the message input with the provided `body`.

**Important**: Messages are never automatically sent. The user must press the send button after reviewing or editing the prefilled content.

#### Parameters

- **contactAddress** - The +E164-formatted phone number of the contact.
  - If `contactAddress` is invalid or not provided, the app will navigate to the Messages tab.
  - If an SMS conversation with `contactAddress` exists, the user will be directed to that conversation; otherwise a new SMS conversation will be created.
- **companyAddress** (optional) - The +E164-formatted phone number to use as the messaging sender ID.
  - `companyAddress` must be a phone number from the user's [list of available SMS-capable numbers](https://account.spokephone.com/phone-numbers/advanced-routing).
  - If `companyAddress` is invalid, the user will be prompted to select a valid phone number from the list of available SMS sender IDs.
- **body** (optional) - The message content to prefill in the message input.
  - `body` should be URI-encoded to ensure correct parsing.
  - If `body` is not provided, the message input will be empty.

#### Example

`spoke://message/sms?contactAddress=%2B64221112222&companyAddress=%2B14341112222&body=Hi%20Bob%2C%20this%20is%20Alice`

## Send a WhatsApp message

`spoke://message/whatsapp?contactAddress={contactAddress}&companyAddress={companyAddress}&templateName={templateName}`

Starts or continues a WhatsApp conversation using the given `companyAddress` as the sender ID, prefilled with a message generated from the Twilio content template matching `templateName`.

**Important**: Messages are never automatically sent. The user must press the send button after reviewing the content generated from the matching template.

#### Parameters

- **contactAddress** - The WhatsApp address of the contact. E.g.: `whatsapp:+64221112222`
  - If `contactAddress` is invalid or not provided, the app will navigate to the Messages tab.
  - If a WhatsApp conversation with `contactAddress` exists, the user will be directed to that conversation; otherwise a new WhatsApp conversation will be created.
- **companyAddress** (optional) - The WhatsApp address to use as the messaging sender ID. E.g.: `whatsapp:+14341112222`
  - `companyAddress` must be a WhatsApp-capable number from the user's [list of available WhatsApp-capable numbers](https://account.spokephone.com/phone-numbers/advanced-routing).
  - If `companyAddress` is invalid or missing, the user will be prompted to select a valid phone number from the user's list of available WhatsApp sender IDs.
- **templateName** (optional) - The friendly name of the approved WhatsApp content template available.
  - The `templateName` must match the friendly name of the WhatsApp-approved content template on Twilio.
  - If `templateName` is not provided, the user will be prompted to select a template from the list of available templates.
  - If `templateName` is invalid, the message input will be empty.
  - For more details, refer to [our WhatsApp support documentation](https://support.spokephone.com/hc/en-us/search?utf8=%E2%9C%93&query=How+to+setup+WhatsApp+on+Spoke+Phone) or the [Twilio Content API](https://www.twilio.com/docs/content/content-api-resources).

#### Example

`spoke://message/whatsapp?contactAddress=whatsapp%3A%2B64221112222&companyAddress=whatsapp%3A%2B14341112222&templateName=WelcomeMessage`
