sms api document

sms api document


Sms Send

<h1>SMS batch send</h1> <h5>Description</h5> <ul> <li>This interface is used to send the same content in batches</li> </ul> <h5>Request url</h5> <ul> <li><code>http://ip:port/api/v1/sms/sendbatchsms</code></li> </ul> <h5>Request method</h5> <ul> <li>POST or GET</li> </ul> <h5>Request example</h5> <pre><code> GET: http://ip:port/api/v1/sms/sendbatchsms?account=***&amp;amp;sign=***&amp;amp;datetime=***&amp;amp;numbers=13611111111,13722222222&amp;amp;content=***&amp;amp;codeId=10001&amp;amp;action=MARKETING POST: http://ip:port/api/v1/sms/sendbatchsms?account=***&amp;amp;sign=***&amp;amp;datetime=*** post body:{&amp;quot;content&amp;quot;:&amp;quot;test&amp;quot;,&amp;quot;numbers&amp;quot;:&amp;quot;13611111111,13722222222&amp;quot;,&amp;quot;codeId&amp;quot;:&amp;quot;10001&amp;quot;,&amp;quot;action&amp;quot;:&amp;quot;MARKETING&amp;quot;}</code></pre> <h5>Request body</h5> <table> <thead> <tr> <th style="text-align: left;">parameter</th> <th style="text-align: left;">required</th> <th style="text-align: left;">type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">account</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>username</td> </tr> <tr> <td style="text-align: left;">sign</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>MD5 signature (For details, see Interface Description. Sign Signature Generation Method)</td> </tr> <tr> <td style="text-align: left;">datetime</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>GMT+8 current half-hour time in the format of time stamp</td> </tr> <tr> <td style="text-align: left;">numbers</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>Mobile phone number for receiving SMS messages. Multiple numbers are separated by commas (,). No country code is required</td> </tr> <tr> <td style="text-align: left;">content</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>The length of the sent content (urlEncode is required for GET submission) cannot exceed 1024 bytes</td> </tr> <tr> <td style="text-align: left;">codeId</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>Refer to the country code table</td> </tr> <tr> <td style="text-align: left;">action</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>Select any service type:&lt;br&gt;MARKETING&lt;br&gt;VERIFY&lt;br&gt;NOTIFICATION</td> </tr> <tr> <td style="text-align: left;">senderId</td> <td style="text-align: left;"></td> <td style="text-align: left;">string</td> <td>Send ID and contact customer service to get the specified ID</td> </tr> <tr> <td style="text-align: left;">routing</td> <td style="text-align: left;"></td> <td style="text-align: left;">string</td> <td>If you need to specify a channel, please contact the platform for requests</td> </tr> </tbody> </table> <h5>Responses</h5> <pre><code> { &amp;quot;status&amp;quot;: 0, &amp;quot;message&amp;quot;: &amp;quot;****&amp;quot;, &amp;quot;data&amp;quot;: [ &amp;quot;success&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;fail&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;batchNo&amp;quot;: &amp;quot;16685020111564&amp;quot; ] }</code></pre> <h5>Responses body</h5> <table> <thead> <tr> <th style="text-align: left;">parameter</th> <th style="text-align: left;">type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">status </td> <td style="text-align: left;">int</td> <td>5: Black number restriction 4: country code error 3: Channel not found 2: failed to send 1: succeeded in sending 0: succeeded in submitting -1: authentication error -2: restricted IP access -3: sensitive characters in the short message -4: empty -5: The short message is too long -6: The short message is not a template or is not reported in the direction of the mainland, Hong Kong, Macao, or Taiwan. -7: The number is too many. -8: The number is empty. -9: The number is abnormal. -10: The channel balance is insufficient and cannot meet the requirements for this sending. Contact the administrator. -13: The user is locked. -14: The id query is abnormal. -15: The request frequency is too fast. -16: The time range is exceeded. -17: The SMS template cannot be empty. -18: the country code ID cannot be empty. -19: The country code ID is incorrect </td> </tr> <tr> <td style="text-align: left;">message </td> <td style="text-align: left;">string</td> <td>Error message </td> </tr> <tr> <td style="text-align: left;">data['success']  </td> <td style="text-align: left;">int</td> <td>Number of successful submissions  </td> </tr> <tr> <td style="text-align: left;">data['fail']  </td> <td style="text-align: left;">int</td> <td>Number of submission failures </td> </tr> <tr> <td style="text-align: left;">data['batchNo']   </td> <td style="text-align: left;">string</td> <td>Submit the batch number returned by the batch SMS </td> </tr> </tbody> </table>

页面列表

ITEM_HTML