API Documentation
Maiyun SMS provides a simple REST API for sending SMS worldwide.
Authentication
All requests must include
Authorization: Bearer YOUR_API_KEY in the header. Obtain your API Key from the console.POST
/api/sendSend SMSRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone | string | Required | Recipient phone with country code, e.g. 8613800138000 (86 = China Mainland). |
| text | string | Required | SMS body, UTF-8. Max 160 chars per segment (70 for Chinese); auto-split if exceeded. |
Success Response
response.json
{
"result": 1,
"uid": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}Error Response
error.json
{
"result": 0,
"error": "phone format error"
}Response Fields
| Field | Type | Description |
|---|---|---|
| result | number | 1 = success, 0 = failure |
| uid | string | Unique message ID returned on success, useful for status tracking |
| error | string | Error description, returned on failure |