sms api document

sms api document


Mail Send

<h1>Mail send</h1> <h5>Description</h5> <ul> <li>This interface is used to send mails individually or in batches</li> </ul> <h5>Request url</h5> <ul> <li><code>http://ip:port/api/v1/email/sendEmail</code></li> </ul> <h5>Request method</h5> <ul> <li>POST</li> </ul> <h5>Request example</h5> <pre><code> http://ip:port/api/v1/email/sendEmail?account=***&amp;amp;sign=***&amp;amp;datetime=*** post body:{&amp;quot;emails&amp;quot;:&amp;quot;123@163.com&amp;quot;,&amp;quot;theme&amp;quot;:&amp;quot;xxxxx&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;xxxxx&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;">emails</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>Recipient email address. Multiple emails are separated by commas (,)</td> </tr> <tr> <td style="text-align: left;">theme</td> <td style="text-align: left;">required</td> <td style="text-align: left;">string</td> <td>Email subject</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>Email content</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;array&amp;quot;: [ [123@163.com,48d5112288668ebb049dbb9034402910], [456@163.com,c11d34242000e541f63fbdef3e36b1db] ] ] }</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>3:Channel not found&lt;br&gt;2:send fail&lt;br&gt;1:success&lt;br&gt;0:Submitted successfully&lt;br&gt;-1:auth error&lt;br&gt;-2:IP access restriction&lt;br&gt;-3:Missing send field&lt;br&gt;-4:email subject is empty&lt;br&gt;-5:email content is empty&lt;br&gt;-7:Mail overload&lt;br&gt;-9:Recipient blank&lt;br&gt;-10:Insufficient account balance&lt;br&gt;-11:The timing time format is incorrect&lt;br&gt;-14:application was not found&lt;br&gt;-15:Request frequency too fast&lt;br&gt;-16:Out of time limit </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['array']   </td> <td style="text-align: left;">Array</td> <td>Array of successfully submitted mails. The array contains recipient and query ID of mail sending result, which are both strings </td> </tr> </tbody> </table>

页面列表

ITEM_HTML