Send Message
POST/messages/send
Send a message with specified details such as destination number, message content, scheduled send time, and validity period. Requires Bearer Auth Token from ApiManagement for authentication. Throws an exception if failed to send the message, if there's insufficient balance, or for other system errors.
Request
- application/json
Body
required
Request body for sending a message.
The destination number of the message.
The message content.
The date and time when the message will be sent.
The validity period of the message (in seconds).
Responses
- 200
- 400
- 401
- 402
- 500
Message sent successfully.
- application/json
- Schema
- Example (from schema)
Schema
status object
Object containing the status of the response.
A message describing the status of the operation.
Http Error Code.
A list of error messages (empty for success).
message object
The id of the message.
The destination number of the message.
The message content.
The date and time when the message will be sent.
The date and time when the message was created.
The date and time when the message was delivered.
The validity period of the message.
{
"status": {
"message": "Status Message",
"error_code": 200,
"errors": []
},
"message": {
"id": "1",
"dest_number": "628123456789",
"short_message": "Test Message",
"schedule_send_at": "2024-01-01 12:12:12",
"created_at": "2024-01-01 12:12:12",
"delivered_at": "2024-01-01 12:12:12",
"validity_period": 60
}
}
Failed to send message. Check the response for details.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the status of the operation.
Http Error Code.
A list of error messages (empty for success).
{
"message": "Status Message",
"error_code": 200,
"errors": []
}
Unauthorized. Invalid token.
- application/json
- Schema
- Example (from schema)
Schema
status object
Object containing the status of the response.
A message describing the status of the operation.
Http Error Code.
A list of error messages (empty for success).
{
"status": {
"message": "Status Message",
"error_code": 200,
"errors": []
}
}
Failed to send message. Insufficient balance.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the status of the operation.
Http Error Code.
A list of error messages (empty for success).
{
"message": "Status Message",
"error_code": 200,
"errors": []
}
Internal Server Error.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the status of the operation.
Http Error Code.
A list of error messages (empty for success).
{
"message": "Status Message",
"error_code": 200,
"errors": []
}