text, image, voice, and document — to any recipient that can be reached through TGO Connect. All messages are sent through the POST /api/v1/messages endpoint using an active sender number.
Before sending, make sure you have at least one registered and verified sender number.
Sending messages requires the
messages.send scope on your API key. Reading message logs requires messages.read. Make sure your key has the appropriate scopes for the operations you intend to perform.Identify the sender
You can specify the sender either by phone number or by sender number ID.- By phone number
- By sender number ID
Pass the
sender_phone field with the full E.164 phone number of the registered sender:sender_phone or sender_number_id — not both.
Send a text message
Send a plain-text message using a JSON body:Send a media message
Forimage, voice, and document messages, upload the file as multipart/form-data with the file attached in the media field:
voice messages, include the duration field (in seconds, between 1 and 300):
Check contact reachability
Before sending, verify that a recipient’s phone number exists in TGO Connect and can receive messages. This avoids failed sends and unnecessary API calls.contacts.lookup scope.
Read message logs
Retrieve the history of messages sent from your organization:id, sender_number_id, message_type, content, status, and sent_at timestamp.
Check usage
Retrieve message usage grouped by sender number:usage.read scope.