Send a message
curl -X POST https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json \
-u YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN \
-d "To=+491234567890" \
-d "From=+491098765432" \
-d "Body=Hello from mycpaas"
const axios = require("axios");
const ACCOUNT_SID = "YOUR_ACCOUNT_SID";
const AUTH_TOKEN = "YOUR_AUTH_TOKEN";
const response = await axios.post(
`https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/${ACCOUNT_SID}/Messages.json`,
new URLSearchParams({
To: "+491234567890",
From: "+491098765432",
Body: "Hello from mycpaas",
}),
{ auth: { username: ACCOUNT_SID, password: AUTH_TOKEN } }
);
console.log("Message SID:", response.data.sid);
import requests
from requests.auth import HTTPBasicAuth
ACCOUNT_SID = "YOUR_ACCOUNT_SID"
AUTH_TOKEN = "YOUR_AUTH_TOKEN"
response = requests.post(
f"https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/{ACCOUNT_SID}/Messages.json",
data={
"To": "+491234567890",
"From": "+491098765432",
"Body": "Hello from mycpaas",
},
auth=HTTPBasicAuth(ACCOUNT_SID, AUTH_TOKEN),
)
print("Message SID:", response.json()["sid"])
Parameters
| Parameter | Required | Description |
|---|---|---|
To | ✅ | Recipient phone number (E.164 format) |
From | ✅ | Your mycpaas sender number |
Body | ✅ | Message text |
MediaUrl | ❌ | URL of media attachment (MMS) |
StatusCallback | ❌ | Webhook URL for status updates |
Response
{
"sid": "SM_YOUR_MESSAGE_SID",
"to": "+491234567890",
"from": "+491098765432",
"body": "Hello from mycpaas",
"status": "queued",
"date_created": "2026-04-19T10:00:00Z"
}
List messages
cURL
curl https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json \
-u YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN
Message status values
| Status | Meaning |
|---|---|
queued | Message accepted, waiting to be sent |
sending | Currently being sent |
sent | Successfully delivered to carrier |
delivered | Confirmed delivery to recipient |
failed | Delivery failed |
undelivered | Could not be delivered |

