Text a lead
send_lead_smsSend one SMS to a lead, from this account's registered number, and record it on the lead. You do not choose the recipient number or the sending number: both are resolved from the lead record and the account. Sending is refused unless the recipient has a recorded opt-in, is not on the do-not-text or opt-out list, and it is inside their local allowed hours. Those checks run on the server and cannot be overridden by anything you pass. A refusal is not a fault to report as an outage, it is the answer. Set message_class to marketing for anything promotional, a follow-up, or anything with a call to action; transactional is only for a direct reply about what this person contacted us about. If you are unsure, it is marketing. An opt-out line is added automatically, so do not write one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | The message. Keep it under 320 characters. Do not include an opt-out instruction, one is appended for you. | |
| lead_id | Yes | The lead to message. Get one from list_leads or search_contacts. | |
| message_class | Yes | marketing for promotional or follow-up messages (needs written opt-in), transactional for a direct reply about their own enquiry. |