Skip to main content
POST
/
messages
Send a message
curl --request POST \
  --url https://business.tgo-eg.com/api/v1/messages \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "to_phone": "+201010000000",
  "type": "text",
  "sender_number_id": 123,
  "sender_phone": "+201001187188",
  "content": "<string>",
  "duration": 150,
  "file_name": "<string>",
  "file_size": 123,
  "file_type": "<string>"
}
'
{
  "data": {
    "id": 123,
    "sender_number_id": 123,
    "recipient_user_id": 123,
    "conversation_id": 123,
    "message_id": 123,
    "message_type": "<string>",
    "content": "<string>",
    "status": "<string>",
    "sent_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-Api-Key
string
header
required

Body

to_phone
string
required
Example:

"+201010000000"

type
enum<string>
required
Available options:
text,
image,
voice,
document
sender_number_id
integer

Required when sender_phone is not provided.

sender_phone
string

Required when sender_number_id is not provided.

Example:

"+201001187188"

content
string | null
duration
integer | null
Required range: 1 <= x <= 300
file_name
string | null
file_size
integer | null
file_type
string | null

Response

Message accepted and logged.

data
object