Update mail to SMS configuration

This method allows you to update the mail2sms configuration.

PUT

/mail2sms/configuration

Parametri query

active Enable or disable mail2sms service.
has_registred_sender Enable the use of the same sender to send SMS with mail2sms.
registred_sender Define the sender. This is required if has_registred_sender is set to 1.
link_detection Enable link detection and short link.
detect_signature Enable signature detection.
static_destination Enable the use of the same destination number to send SMS with mail2sms.
destinations Define destinations. This is required if static_destination is set to 1.
whitelisted_ip Define IPs allowed to use mail2sms.
whitelisted_email Define email allowed to use mail2sms.
alternate Enable alternate mode. If alternate is set to 1, email adress used to sent SMS must contains destination number and will have this format :
33612345678@alert-abcdef.mail2sms.smsfactor.com

Esempi


PUT /mail2sms/configuration HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/json

{
  "configuration": {
      "active": 1,
      "is_sender_custom": 1,
      "sender_value": "mysender",
      "detect_link": 0,
      "detect_signature": 1,
      "static_destinations": 1,
      "destinations": [
          "33612345678",
          "33611111111"
      ],
      "whitelisted_ip": [
        "127.0.0.1"
      ],
      "whitelisted_email": [
          "myemailaddress@smsfactor.com"
      ],
      "alternate": 0
  }
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <configuration>
    <active>1</active>
    <is_sender_custom>1</is_sender_custom>
    <sender_value>mysender</sender_value>
    <detect_link>0</detect_link>
    <detect_signature>1</detect_signature>
    <static_destinations>1</static_destinations>
    <destinations>
      <value>33612345678</value>
      <value>33611111111</value>
    </destinations>
    <whitelisted_ip>
      <value>127.0.0.1</value>
    </whitelisted_ip>
    <whitelisted_email>
      <value>myemailaddress@smsfactor.com</value>
    </whitelisted_email>
    <alternate>0</alternate>
  </configuration>
  <recipients>
  
  </recipients>
</response>
        
      

Formato della risposta


{
  "status": 1,
  "message":"OK"
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>1</status>
    <message>OK</message>
</response>