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 SMS

Request Parameters

ParameterTypeRequiredDescription
phonestringRequiredRecipient phone with country code, e.g. 8613800138000 (86 = China Mainland).
textstringRequiredSMS 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

FieldTypeDescription
resultnumber1 = success, 0 = failure
uidstringUnique message ID returned on success, useful for status tracking
errorstringError description, returned on failure