Send MMS API
Send an outbound MMS from your TxTRIA account
POST
https://txtria.com/api/sendsms
Query Parameter
| Key | Description | Required | Example |
|---|---|---|---|
| To | Phone number you want to send MMS to | Yes | +1832324XXXX |
| From | TxTRIA number you want to send MMS from | Yes | 562742XXXX |
| Body | Message text | No | Sending MMS... |
| FileName0 | Media File Name | Yes | samplemms.png |
| MediaUrl0 | URL | Yes | https://txtria.com/images/samplemms.png |
| sys_id | Your TxTRIA sys_id | Yes | ACfc98e7b0aae031b9h... |
| auth_token | Your TxTRIA account token | Yes | c74eac89884a126a2c... |
$url = 'https://txtria.com/api/sendsms';
$data = array(
'To' => '+18323249XXX',
'From' => '5627424XXX',
'Body' => 'Sending+MMS...', // URL Encoded
'FileName0' => 'media.png',
'MediaUrl0' => 'https://m.com/media.png',
'sys_id' => 'ACfc98e7b0aae031b9fa',
'auth_token' => 'c74eac89884a126a2cca'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Example Response
{
"success": "1",
"status": "queued [Possible status: queued or error]",
"message": "Message queued successfully",
"tracking_id": "5bb69526c6d1670520d75f5e0d76b0ad"
}