SendMessage
Send outgoing SMS messages from your Twilio phone number to mobile phones around the globe.
Stored Procedure-Specific Information
To run this procedure, you must specify From, To, and at least one of Body or ContentTemplateSid.
To send a plain text message, specify Body:
EXEC SendMessage From='12243318812', To='18777804236', Body='Hello from Twilio'
To send a Content template, specify ContentTemplateSid. Optionally pass ContentTemplateVariables to supply values for the placeholders defined in the template:
EXEC SendMessage From='12243318812', To='18777804236', ContentTemplateSid='HXdbb2d39ce55b1a1c33c6e52200c2030f';
EXEC SendMessage From='12243318812', To='18777804236', ContentTemplateSid='HXdbb2d39ce55b1a1c33c6e52200c2030f', ContentTemplateVariables='{"1":"Owl Air Customer"}';
Input
| Name | Type | Required | Description |
| From | String | True | The phone number or sender Id that sent the message. |
| Body | String | False | The body of the message. |
| To | String | True | The phone number the message was sent to. |
| ContentTemplateSid | String | False | The SID of the Content Template to use when sending the message. |
| ContentTemplateVariables | String | False | A JSON object containing values for the variables defined in the content template. |
| StatusCallback | String | False | By including a StatusCallback URL in your API call, you can tell Twilio where to POST information about your message. |
Result Set Columns
| Name | Type | Description |
| Status | String | Sucess Message that represents message is sent. |
| AccountSid | String | Account Sid. |
| APIVersion | String | Version of the API. |
| Body | String | Message body. |
| DateCreated | String | Date created. |
| DateSent | String | Sent message date. |
| DateUpdated | String | Message updated date. |
| Direction | String | Direction. |
| ErrorCode | String | Error code in case message is not sent. |
| ErrorMessage | String | Error message in case message is not sent. |
| From | String | Twilio phone number or messaging service that sends this message. |
| MessagingServiceSid | String | Messaging service sid. |
| NumMedia | String | Num media. |
| NumSegments | String | Num segments. |
| Price | String | Price. |
| PriceUnit | String | Price Unit. |
| Sid | String | Sid. |
| SubresourceUrisMedia | String | Subresource media urls. |
| To | String | PhoneNumber on which messaging is sent. |
| Uri | String | Uri. |