Message resource is the main entry point for sending messages. To send a message, you have to specify a contact with the phone number you already have.
{
"contact": { // use either 'id' or 'phone_number'
"phone_number": "+1 (555) 857-6309", // phone_number can be used if you sent at least one template message to this contact
"id": "516218975326459"
},
"channel": {...},
"content": {...}
}
{
"id": "...",
"contact": {
"id": "6456078781510718339",
"phone_number": "15558576309"
},
"channel": {...},
"content": {...}
}
Phone Number Format
Note that the phone number in response is in E.164 format. All responses and webhooks coming from Amio use this format.