Update a webhook

PUT

/webhook/:id

Query Parameters

id
required
The webhook id

Body Parameters

type
required
The webhook type (MO / DLR / STOP / CLICKER)
url
required
The webhook url

Examples



PUT /webhook/66 HTTP/1.1
Host: api.smsfactor.com
Authorization: your.token
Accept: application/json

{
  "webhook":{
    "type": "STOP",
    "url": "https://mywebhook.com/stop"
  }
}
      
    

PUT /webhook/66 HTTP/1.1
Host: api.smsfactor.com
Authorization: your.token
Accept: application/xml


<?xml version="1.0" encoding="UTF-8"?>
  <webhook>
    <type>STOP</type>
    <url>https://mywebhook.com/stop</url>
  </webhook>
    
  

Result Format



{
  "status": 1,
  "message": "OK",
  "webhook": {
      "webhook_id": "66",
      "type": "STOP",
      "url": "https://mywebhook.com/stop"
  }
}
          
        


<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>1</status>
  <message>OK</message>
  <webhook>
    <webhook_id>66</webhook_id>
    <type>STOP</type>
    <url>https://mywebhook.com/stop</url>
  </webhook>
</response>