Update a webhook status

This method can be used to change the status of a webhook.

PUT

/webhook/:id/status

Query Parameters

id
required
The webhook id

Body Parameters

status
required
The webhook status (live, paused)

Examples



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

{
  "webhook":{
    "status": "live"
  }
}
      
    

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


<?xml version="1.0" encoding="UTF-8"?>
  <webhook>
    <status>live</status>
  </webhook>
    
  

Result Format



{
  "status": 1,
  "message": "OK",
  "webhook": {
        "webhook_id": "66",
        "status": "live",
        "type": "MO",
        "url": "https://mywebhook.com/mo",
        "signature": null
  }
}
          
        


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